When I call API and it returns error 407, I would like to handle this case but I very surprised when I found that response from Chrome and Firefox is not the same.
fetch('https://xxxx.xxx/xxx', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
}).then(function(response) {
console.log('res', response)
}, function(error) {
console.log('err', error)
})
Chrome goes to error case, nothing to tell me about this 407 error, but Firefox can get status code.
I don't know it a bug or my fault, I already Google but I nothing to make me clear. Please help me clear on this issue, Thanks.