Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
An asynchronous try catch / exception handler with long stack traces for node.js
See the "Background" from the long-stack-traces module.
npm install trycatch
trycatch(function() {
function f() {
throw new Error('foo');
}
setTimeout(f, Math.random()*1000);
setTimeout(f, Math.random()*1000);
}, function(err) {
console.log("This is an asynchronous scoped error handler!\n", err.stack);
});
$ node examples/setTimeout.js
This is an asynchronous scoped error handler!
Error: foo
at Object.f (/path/to/trycatch/examples/setTimeout.js:5:9)
at Timer.callback (timers.js:83:39)
----------------------------------------
at setTimeout
at /path/to/trycatch/examples/setTimeout.js:8:2
at Object.<anonymous> (/path/to/trycatch/examples/setTimeout.js:3:1)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
This is an asynchronous scoped error handler!
Error: foo
at Object.f (/path/to/trycatch/examples/setTimeout.js:5:9)
at Timer.callback (timers.js:83:39)
----------------------------------------
at setTimeout
at /path/to/trycatch/examples/setTimeout.js:9:2
at Object.<anonymous> (/path/to/trycatch/examples/setTimeout.js:3:1)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
http.createServer(function(req, res) {
trycatch(function() {
setTimeout(function() {
throw new Error('Baloney!');
}, 1000);
}, function(err) {
res.writeHead(500);
res.end(err.stack);
});
}).listen(8000);
Visit http://localhost:8000 and get your 500.
FAQs
An asynchronous domain-based exception handler with long stack traces for node.js
The npm package trycatch receives a total of 482 weekly downloads. As such, trycatch popularity was classified as not popular.
We found that trycatch 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.