-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I didn't notice until trying to debug some Axios responses, but for some reason, axios doesn't include `error.response.data`, the attribute that says why the API call failed (on docassemble at least) in `error.toJSON()`. This change adds it back in the returned JS object manually, additionally optional chaining to make sure that it doesn't crash if `error.response` isn't present for some reason. Optional chaining is supported in Node 14 and above, which we are on.
- Loading branch information
1 parent
038fc84
commit 1ded185
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters