-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newErrorHandling suppresses any error codes #277
Comments
Hello @skrud-dt! I don't see |
Hi @MrRefactoring , specifically I wanted these fields:
I ended up setting
By emptying out the Indeed it looks like there's no statusText property of AxiosResponse; but it's defined in their TypeScript definition here: https://github.com/axios/axios/blob/v1.x/index.d.ts#L380-L387 |
|
Released in |
Under documentation, we're told to set
newErrorHandling: true
: https://github.com/MrRefactoring/jira.js#deprecation-warningsHowever, this strips out all metadata from the axios error including the
status
,statusText
, andcode
. I know axios errors include lots of extra information that could cause leaks (like headers, etc.) - but without thestatus
andcode
fields, it's impossible to know what actually went wrong.The
data
field in the Axios Response is maintained, but from JIRA this contains an array of localized strings. Which is impossible to compare against.Specifically, let's say I try to look up an issue that doesn't exist or that I don't have permission to see.
Using
newErrorHandling
, this gives me back an object like this:And there is nothing else in the object. This isn't useful to me.
Furthermore, there doesn't seem to be a workaround, because the client's
onError
middleware receives the transformed error (e.g. the one with all the fields stripped out), not the raw Axios error.The text was updated successfully, but these errors were encountered: