You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below should fail, I am sending invalid credentials but e is null and I am forced to read the res object to get the statusCode value which, incidentally, is correctly set as 403.
Knox does not actually handle HTTP errors. From its perspective, the request completed successfully; you would get e !== null if there were some kind of network problem, for example. You'll notice the first few examples in the readme check the status code against 200 as well.
That said, I agree this is not as user-friendly as it could be. See #59. I think I'll close both this and that one and open a new, better-named bug to track this issue.
The code below should fail, I am sending invalid credentials but
e
isnull
and I am forced to read theres
object to get the statusCode value which, incidentally, is correctly set as 403.The text was updated successfully, but these errors were encountered: