fix(fetch): handle non-JSON error responses better#1324
Merged
kanadgupta merged 2 commits intonextfrom Aug 6, 2025
Merged
Conversation
erunion
approved these changes
Aug 6, 2025
kanadgupta
pushed a commit
that referenced
this pull request
Aug 6, 2025
# [10.5.0-next.5](v10.5.0-next.4...v10.5.0-next.5) (2025-08-06) ### Bug Fixes * **fetch:** handle non-JSON error responses better ([#1324](#1324)) ([383123f](383123f)) [skip ci]
Contributor
Author
|
🎉 This PR is included in version 10.5.0-next.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
kanadgupta
pushed a commit
that referenced
this pull request
Aug 22, 2025
# [10.5.0](v10.4.0...v10.5.0) (2025-08-22) ### Bug Fixes * **fetch:** handle non-JSON error responses better ([#1324](#1324)) ([383123f](383123f)) * **openapi/upload:** custom slugs for URL uploads ([#1313](#1313)) ([ab48677](ab48677)) * **v9/docs:** migration guide + deprecation notice updates ([#1208](#1208)) ([1fa6adb](1fa6adb)) ### Features * **inspect:** splitting apart `xml` into three fine-tuned datasets ([#1305](#1305)) ([2e10328](2e10328)) * new `rage` command for printing out environment data for debugging ([#1310](#1310)) ([c773af8](c773af8)) * **openapi/upload:** docs + DX enhancements for slugs vs. legacy IDs ([#1309](#1309)) ([5272a7e](5272a7e)) * **plugins:** add `runRdmeCommand` helper ([#1292](#1292)) ([12fea84](12fea84)) [skip ci]
Contributor
Author
|
🎉 This PR is included in version 10.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧰 Changes
a customer was uploading an excess of 150+ pages and a handful appear to consistently fail with errors that aren't particularly helpful:
evidently our API is periodically responding with non-JSON despite sending a JSON content type? this updates our API response handling so we can display a friendlier error and better troubleshoot these errors when we see them.
🧬 QA & Testing
added a test and confirmed all the existing ones are still passing!