-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle unexpected type changes in PagerDuty REST API error responses
The PagerDuty REST API documentation[1] indicates that the `errors` field of an error response is an array of error strings. However, as shown in #339 the API sometimes violates that specification and instead returns the `errors` field as a string. There is a PagerDuty customer support ticket open[2] to to address this issue, but there is currently no ETA on the resolution. As such we are going to create this workaround to properly parse the invalid responses and return the proper error type to callers. Closes #339 [1] https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTYz-errors [2] https://tickets.pagerduty.com/hc/requests/341221
- Loading branch information
Showing
2 changed files
with
89 additions
and
3 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
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