I have a code fragment like this:
(...).catch(e) => {
if(e.response.status === 401) {
console.log("Wrong username or password")
} else {
console.log(e.statustext)
}}
And I have error like this: Unhandled Exception (TypeError): cannot read property status of undefined
How can I fix it?
console.log(e)and see what it is, presumablyresponsedoesn't exist on theeobject