Skip to content

Fail response is undefined in 400 error #230

@cruzlutor

Description

@cruzlutor

I'm trying to get the server response in 400 status code request, but the second variable is undefined

reqwest({
    url: 'exampleurl',
    method: 'post',
    data: {}
})
.then((resp) => {
    ...
})
.fail((err, resp) => {
    console.log(err, resp)
})

the output console is

XMLHttpRequest {}, undefined

While the server response is a json object, in fails function it's undefined

It's a bug?

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