
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
catch-global-error
Advanced tools
devtools(vConsole)、upload error、monitoring logs
npm install catch-global-error --save
// or
yarn add catch-global-error
import CatchError from 'catch-global-error';
const catchError = new CatchError();
catchError.init({
url: '/api/error/log', // upload error site
});
const a = 1;
console.log(a.b.c);
initialize
options parameter
| param | description | type | value | default value |
|---|---|---|---|---|
| url | the site of uploading error | String | - | - |
| method | the method of uploading error | String | get/post | post |
| showDevtools | show devtools | Boolean | true/false | false |
| urlSwitch | url query for devtools | Object | - | { devtools: 'show' } |
| cdn | vConsole cdn | String | - | 'https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js' |
| extendFields | add extend field about business or project what you want to send to the service, such as business_line, type | Object | - | - |
show devtools
showDevtools = true// 1: init
import CatchError from 'catch-global-error';
const catchError = new CatchError();
catchError.init({
showDevtools: true, // default show Devtools
});
// default: www.***.com?devtools=show
// you can change url query switch
// eq: www.***.com?show=test
import CatchError from 'catch-global-error';
const catchError = new CatchError();
catchError.init({
urlSwitch: {
show: 'test',
},
});
import CatchError from 'catch-global-error';
const catchError = new CatchError();
catchError.init();
window.onclick = () => {
catchError.show();
};
MIT
FAQs
catch javascript global error
We found that catch-global-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.