Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axios-better-stacktrace

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-better-stacktrace

Axios plugin that provides better stack traces for axios errors

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53K
increased by4.83%
Maintainers
1
Weekly downloads
 
Created
Source

axios-better-stacktrace

Axios plugin that provides better stack traces for axios errors.

Check this axios issue for more details.

npm npm ci npm

Installation

NPM

npm install axios-better-stacktrace

Yarn

yarn add axios-better-stacktrace

Note

It was tested with axios 0.21.0.

Usage

// CommonJS
// const axiosBetterStacktrace = require('axios-better-stacktrace');

// ES6
import axiosBetterStacktrace from 'axios-better-stacktrace';

axiosBetterStacktrace(axios);

Example

Axios error without axios-better-stacktrace plugin:

Error: Request failed with status code 500
  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:376:20)
  at endReadableNT (node:internal/streams/readable:1294:12)
  at processTicksAndRejections (node:internal/process/task_queues:80:21)

Axios error with axios-better-stacktrace plugin:

Error: Request failed with status code 500
  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:376:20)
  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 patch] (./src/axiosBetterStacktrace.ts:59:41)
  at ./src/axiosBetterStacktrace.spec.ts:51:19
  at step (./src/axiosBetterStacktrace.spec.ts:33:23)
  at Object.next (./src/axiosBetterStacktrace.spec.ts:14:53)
  at ./src/axiosBetterStacktrace.spec.ts:8:71
  at new Promise (<anonymous>)
  at Object.<anonymous>.__awaiter (./src/axiosBetterStacktrace.spec.ts:4:12)
  at Object.<anonymous> (./src/axiosBetterStacktrace.spec.ts:41:57)
  at Object.asyncJestTest (./node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:106:37)
  at ./node_modules/jest-jasmine2/build/queueRunner.js:45:12

Keywords

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc