fix(errors): handle Content-Type parameters - #882
fallintoplace wants to merge 2 commits into
Conversation
|
Thanks @fallintoplace! Please use our PR template: ### Change summary
<!--
Briefly describe the changes introduced in this pull request. Include context or
reasoning behind the changes, even if they seem minor. If relevant, link to any
related discussions (e.g. Slack threads, tickets, documents).
-->
All Submissions:
* [ ] Have you followed the guidelines in our Contributing document?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/fastly/go-fastly/pulls) for the same update/change?
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### New Feature Submissions:
* [ ] Does your submission pass tests?
### Changes to Core Features:
* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?
### User Impact
<!-- What is the user impact of this change? -->
### Are there any considerations that need to be addressed for release?
<!-- Any breaking changes, etc -->
|
|
Hi @fallintoplace - thanks for your contribution. I took a look through our recorded API responses and didn't find any error responses where the |
|
Fastly documents |
Thanks for providing the reference @fallintoplace. FYI - the document you linked is archived - the live doc lives here: https://www.fastly.com/documentation/reference/api/account/service-authorization/. With that being said, |
Change summary
Fix HTTP error decoding when the
Content-Typeheader includes parameters. This keeps structured API error fields in the decoded error.All Submissions:
Changes to Core Features:
User Impact
Parameterized
Content-Typevalues now use the correct decoder, preserving JSON:API and problem details fields.Are there any considerations that need to be addressed for release?
No breaking changes.