JSPM

  • Created
  • Published
  • Downloads 17429
  • Score
    100M100P100Q151681F
  • License MIT

An axios error wrapper that aim to provide clear error message to the user

Package Exports

  • axios-error

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (axios-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

axios-error

An axios error wrapper that aim to provide clear error message to the user

Installation

npm i --save axios-error

or

yarn add axios-error

Usage

const AxiosError = require('axios-error');

// You can construct it from error throw by axios
new AxiosError(message, errorThrowByAxios);

// Or construct it from axios config, axios request and axios response
new AxiosError(message, { config, request, response });