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

Error handling support is not useful #11

Open
kmicklas opened this issue Jul 2, 2021 · 0 comments
Open

Error handling support is not useful #11

kmicklas opened this issue Jul 2, 2021 · 0 comments

Comments

@kmicklas
Copy link

kmicklas commented Jul 2, 2021

apiRequestXhr and performXhrRequests use Either Text to report an error condition. However, the only possible error string ever generated is Response could not be decoded for request: plus the JSON encoding of the request.

Even if we aren't really meant to use HTTP errors for application errors, it is still useful to be able to distinguish different types of non-application errors, e.g. internal server errors, timeouts, authentication issues, etc.

As it stands, the error reporting is no more useful than Maybe. For maximum flexibility I think it would help if the actual XHR response was returned on a non-successful status or JSON decoding failure.

@alexfmpe alexfmpe closed this as completed Jul 3, 2021
@alexfmpe alexfmpe reopened this Jul 3, 2021
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