Skip to content

Handling of empty response body for error response codes #25

@alex-tsx

Description

@alex-tsx

It is seen here, that we evaluate response.data identically for 'success' & error response codes.

In case of 404 error and when await response.text() === '', reading await response.json() throws an error

SyntaxError: Unexpected end of JSON input

The default axios XHR adapter behaves differently & won't throw in this case. With this adapter I have to look into caught error message text at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions