Skip to content

Request throwing error when status code is 500 #3

@matheussss1

Description

@matheussss1

Package version

9.1.0

Describe the bug

@thetutlage

Why does the client throws an error when the request return a 500 status code?

It makes no sense to me, including the fact that at the docs we have this:

if (response.hasFatalError()) {
  response.error()
}

How could i access reponse.hasFatalError if when the fatal error occurs the client just throw an error and the test stop?

Even if i make a .catch block, the returned value has a prototype of Error, not ApiResponse

Reproduction repo

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions