Skip to content
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

Add an option to remove the original axios stack #11

Open
mariuszste opened this issue Feb 22, 2023 · 0 comments
Open

Add an option to remove the original axios stack #11

mariuszste opened this issue Feb 22, 2023 · 0 comments

Comments

@mariuszste
Copy link

I see no point in including the original axios stack since It's borderline useless.

My suggestion is to add an option that transforms this:

Error: Request failed with status code 404
    at createError (./node_modules/axios/lib/core/createError.js:16:15)
    at settle (./node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (./node_modules/axios/lib/adapters/http.js:244:11)
    at IncomingMessage.emit (node:events:388:22)
    at IncomingMessage.EventEmitter.emit (node:domain:470:12)
    at endReadableNT (node:internal/streams/readable:1294:12)
    at processTicksAndRejections (node:internal/process/task_queues:80:21)
Error: Axios Better Stacktrace
    at Function.axiosBetterStacktraceMethodProxy [as get] (./src/axiosBetterStacktrace.ts:167:15)
    at getNpmPage (./demo/index.ts:10:35) <---- this is what usually useful to know for further debugging and this plugin adds 🙂
    at ./demo/index.ts:13:9
    at step (./demo/index.ts:33:23)
    at Object.next (./demo/index.ts:14:53)
    at ./demo/index.ts:8:71
    at new Promise (<anonymous>)
    at __awaiter (./demo/index.ts:4:12)
    at ./demo/index.ts:12:2
    at Object.<anonymous> (./demo/index.ts:16:3)

into this

Error: Request failed with status code 404
    at Function.axiosBetterStacktraceMethodProxy [as get] (./src/axiosBetterStacktrace.ts:167:15)
    at getNpmPage (./demo/index.ts:10:35) <---- this is what usually useful to know for further debugging and this plugin adds 🙂
    at ./demo/index.ts:13:9
    at step (./demo/index.ts:33:23)
    at Object.next (./demo/index.ts:14:53)
    at ./demo/index.ts:8:71
    at new Promise (<anonymous>)
    at __awaiter (./demo/index.ts:4:12)
    at ./demo/index.ts:12:2
    at Object.<anonymous> (./demo/index.ts:16:3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant