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)
bugzilla.mozilla.org
Extensions
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;
}
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
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.
Description
•