Closed Bug 1693860 Opened 4 years ago Closed 4 years ago

[WEBHOOKS] The Webhook push connector needs to return more details when an error occurs instead of just the code

Categories

(bugzilla.mozilla.org :: Extensions, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file)

In some webhooks we are getting errors such as "Expected HTTP 200 response, got 422" and that is it. It should also include any other details available in the log entry.

Relevant code from the Webhook connector:

my $headers = HTTP::Headers->new(Content_Type => 'application/json');
    my $request
      = HTTP::Request->new('POST', $webhook->url, $headers, encode_json($payload));
    my $resp = $self->_user_agent->request($request);
    if ($resp->code != 200) {
      die "Expected HTTP 200 response, got " . $resp->code;
    }
    else {
      return PUSH_RESULT_OK;
    }
Attached file GitHub Pull Request

Merged to master.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: