Skip to content

How to get the response json on HTTP error 400+ ? #203

@brijeshb42

Description

@brijeshb42

Suppose I create a request to http://example.com/404, and the response is 404 status code with a json response like this:

{
  "type": "error",
  "message": "What you were looking for isn't here."
}

How can I get the above json using fetch?

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