Open lardcanoe opened 3 years ago
@lardcanoe : The SDK provides all the error details when an exception is thrown ref: https://github.com/intuit/oauth-jsclient#error-logging
Which provides more information about the error :
originalMessage: 'Response has an Error',
error: 'Unauthorized',
error_description: 'Unauthorized',
intuit_tid: '1-606dceb5-xxxxxxxxxxxce650'
If I am missing anything, Could you maybe post the exact error you saw so that we could see if any additional details need to be added?
Thanks
https://github.com/intuit/oauth-jsclient/blob/master/src/response/AuthResponse.js#L106
which is called from
https://github.com/intuit/oauth-jsclient/blob/master/src/OAuthClient.js#L586
AuthResponse.prototype.getJson
is throwing plain Error
which is bubbling up that doesn't have any of the other fields present.
Thanks @lardcanoe . I will get this fixed in the next release 👍
The
AuthResponse.prototype.getJson
function inintuit-oauth/src/response/AuthResponse.js
needs to handle a 401 error more elegantly. I had to monkey-patch the function to figure out what was going on. The OAuth credentials I had were able to refresh the token, but the subsequent call failed withAuthResponse is not JSON
.URL:
Part of response:
Some key headers: