Skip to content

Error handling support is not useful #11

Open
@kmicklas

Description

@kmicklas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions