get-detail-from-error

1.0.2 • Public • Published

get-detail-from-error

Publish Package to npmjs npm version

Catching Errors

  • Axios Error
  • Error

Result format

// for Error type
{
  name: 'string', // error.name
  stack: 'string', // error.stack
  message: 'string' // error.message
}

// for AxiosError type
{
  name: 'string', // error.name + error.code
  endpoint: 'GET /api/fake/12345', // api called
  messsage: 'string', // response.detail.message or  response.message or error.message
  status: 400, // response status code
  response: { } // response data
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.22latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.22
1.0.10
1.0.07

Package Sidebar

Install

npm i get-detail-from-error

Weekly Downloads

9

Version

1.0.2

License

ISC

Unpacked Size

40 kB

Total Files

8

Last publish

Collaborators

  • erodrigues-dev