Improve axios stack traces
Problem
Currently, if you use axios with async / await, you get a stack trace like this: [code block] It doesn't show you much about what called Axios., which makes debugging quite difficult! This is because `settle` calls `createError`: https://github.com/axios/axios/blob/master/lib/core/settle.js#L12-L24 Which creates a new error with a brand new stack trace: https://github.com/axios/axios/blob/master/lib/core/createError.js#L15-L18 Perhaps we can fix this by creating an error before the request goes out and stitching it to the new error's stack trace?
Error Output
Error (/Users/rmenezes/code/seedfi/web/node_modules/axios/lib/core/createError.js:16:15)
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Improve axios stack traces
This makes it super hard to debug bad responses from other servers when you are making lots of calls.
Trust Score
8 verifications
- 1
This makes it super hard to debug bad responses from other servers when you are
This makes it super hard to debug bad responses from other servers when you are making lots of calls.
Validation
Resolved in axios/axios GitHub issue #2387. Community reactions: 46 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep