
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
axios-error
Advanced tools
An axios error wrapper that aim to provide clear error message to the user
npm i --save axios-error
or
yarn add axios-error
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 });
0.5.0 / 2017-10-20
For example, when you catch the error and log it out:
client.sendText().catch(console.error);
You can get some useful information to help you resolve the issue.
Error: Messenger API - 2500 OAuthException An active access token must be used to query information about the current user.
at handleError (/Users/chentsulin/Projects/yoctol/ttt/node_modules/messaging-api-messenger/lib/MessengerClient.js:64:9)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error Message -
Messenger API - 2500 OAuthException An active access token must be used to query information about the current user.
Request -
POST https://graph.facebook.com/v2.10/me/messages?access_token=
Request Data -
{
"recipient": {
"id": ""
},
"message": {
"text": ""
}
}
Response -
400 Bad Request
Response Data -
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "GOnNuiN/ewZ"
}
}
The error messages are powered by axios-error package.
client.getHTTPClient()
method is deprecated. use client.axios
getter instead.client.version
now return version number string (2.10
) instead of the v-prefix version (v2.10
).FAQs
Axios error wrapper that aim to provide clear error message to developers
The npm package axios-error receives a total of 15,107 weekly downloads. As such, axios-error popularity was classified as popular.
We found that axios-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.