-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Improve Jira error handling (#574)
* Wrap the http.Client used by the Jira library to always add an Accept: application/json header to requests. This fixes the XML and HTML responses from some endpoints during error conditions. * Directly use jiraclient.Do method instead of convenience methods to work around library-provided error handling that doesn't work in all cases. This gets rid of vague "inspect response body" errors for failure responses not handled by the library. * Do our own error handling that catches the response format returned by the `/myself` endpoint and others. Signed-off-by: Sam Lucidi <[email protected]>
- Loading branch information
Showing
1 changed file
with
120 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters