Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return response text for string error responses #24

Conversation

michael-wolfenden
Copy link
Contributor

This change return the response text for error responses that aren't JSON.

I also included the response text in the errorContext in case a consumer needed to access it from a hook,

Resolves #23

Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
better-fetch-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 11:55pm

@michael-wolfenden
Copy link
Contributor Author

@Bekacru these tests are failing on main as well.

You get the same test failure by opening https://stackblitz.com/~/github.com/Bekacru/better-fetch and running pnpm test in a new terminal.

@Bekacru Bekacru merged commit dc63bbb into Bekacru:main Feb 9, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error text is thrown away if the text is not JSON parsable
2 participants