![]() Is there some config that needs to be set?Įrror: getaddrinfo ENOTFOUND Īt om (/home/bunny/projects/axiosTest/node_modules/axios/dist/node/axios.cjs:836:14)Īt RedirectableRequest.handleRequestError (/home/bunny/projects/axiosTest/node_modules/axios/dist/node/axios.cjs:3010:25)Īt RedirectableRequest.emit (node:events:513:28)Īt eventHandlers. When making identical requests made with fetch gives me the stack trace I need but with axios 1.4.0 I only get the library stack. Same for me running same versions of Node and axios. Is this still relevant?ĭid pull request (which was an implementation of suggestion) actually fix the problem? I'm running Node v18.16.0 and axios v1.4.0 and still getting stacktraces like what was seeing at the beginning of this issue. I can open a PR with this and discuss the approach if you I didnt see any PRs from the original commenter and I'm happy to complete this. Yes, it MAY degrade performance (imo its negligible) for failing requests, but we all know this is better than having no input for proper debugging. ![]() ![]() captureStackTrace ( axiosError, createError ) return axiosError Var axiosError = enhanceError ( new Error ( message ), config, code, request, response ) if ( Error. I did find a workaround: our axios client is actually in a class, so in reality the first interceptor looks more like this:Īt processTicksAndRejections (internal/process/task_queues.js:95:5)Īt async Object.findAccessPoints (services/data/accessPointDataService.js:26:18)Īt async Object.validateAccessPointForImporting (services/accessPointService.js:130:37)Īt async controllers/accessPointController.js:248:13 I'm guessing because the header isn't set, somehow the error handling is different, and the error object has an empty config in the request interceptor error handler. TypeError : Invalid value "undefined" for header "x-correlation-id"Īt tHeader (_http_outgoing.js:564:3)Īt new ClientRequest (_http_client.js:262:14)Īt RedirectableRequest._performRequest (node_modules/follow-redirects/index.js:265:24)Īt new RedirectableRequest (node_modules/follow-redirects/index.js:61:8)Īt Object.request (node_modules/follow-redirects/index.js:456:14)Īt dispatchHttpRequest (node_modules/axios/lib/adapters/http.js:202:25)Īt httpAdapter (node_modules/axios/lib/adapters/http.js:46:10)Īt dispatchRequest (node_modules/axios/lib/core/dispatchRequest.js:53:10) Perhaps we can fix this by creating an error before the request goes out and stitching it to the new error's stack trace?Įrror Invalid value "undefined" for header "x-correlation-id" Which creates a new error with a brand new stack trace: ![]() This is because settle calls createError: It doesn't show you much about what called Axios., which makes debugging quite difficult! At createError (/Users/rmenezes/code/seedfi/web/node_modules/axios/lib/core/createError.js:16:15)Īt settle (/Users/rmenezes/code/seedfi/web/node_modules/axios/lib/core/settle.js:17:12)Īt IncomingMessage.handleStreamEnd (/Users/rmenezes/code/seedfi/web/node_modules/axios/lib/adapters/http.js:237:11)Īt IncomingMessage.emit (events.js:208:15)Īt (domain.js:471:20)Īt endReadableNT (_stream_readable.js:1154:12)Īt processTicksAndRejections (internal/process/task_queues.js:77:11
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |