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

Why do HTTP status errors only return the code and error text? #194

Open
IronSean opened this issue Apr 9, 2018 · 1 comment
Open

Why do HTTP status errors only return the code and error text? #194

IronSean opened this issue Apr 9, 2018 · 1 comment

Comments

@IronSean
Copy link

IronSean commented Apr 9, 2018

This probably isn't an issue or an enhancement request. I am just trying to understand the thinking of returning only the statusCode and statusText when experiencing an error during fetch. Sometimes the API returns detailed information about what the problem is in the response body, and this strips it away. A third property which is the response body could expose that again.

Is this just implemented this was as it's a good starting point for most cases and a user of redux-api can easily implement their own adapter if they need different behaviour?

return Promise.reject({ status, statusText });

@lexich
Copy link
Owner

lexich commented Apr 9, 2018

Hi @IronSean . Of cause redux-api was written as very customisable and very thin wrapper around redux and ajax providers like fetch api. And it's right way to write your own adapter if you have your specific needs

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

No branches or pull requests

2 participants