get-detail-from-error
v1.0.2
Published
get detail from error
Downloads
11
Readme
get-detail-from-error
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
}