
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@ansaro/micro-raven-errors
Advanced tools
A tiny module for sending Raven errors using Zeit's micro server framework
micro-raven-errors - Micro wrapper for capturing application errors with Raven
yarn add @ansaro/micro-raven-errors
micro-raven-errors exports a single function that wraps a micro services, and captures any errors with an http status of 500 or greater with Raven.
reportErrors: (fn: MicroFunction) => MicroFunction
type MicroFunction = (req http.IncomingMessage, reshttp.ServerResponse) => any
fn
: A function that could otherwise run standalone inside micro. This is your application code.
micro-raven-errors also expect you to provide a Data Source Name, which is a URL where Sentry listens to collect errors from your application. You'll need to set process.env.SENTRY_DSN
to be this URL.
Unexpected application errors and HTTP errors with a status code of 500 or higher will be reported to Sentry. Expected HTTP errors like 404s will not be reported.
const micro = require("micro")
const reportErrors = require("@ansaro/micro-raven-errors");
const testServer = async (req, res) => {
const body = await micro.json(req);
if (!body.name) {
throw micro.createError(400); // not reported to Sentry
}
if (body.massiveError) {
throw micro.createError(500, "This is a massive error"); // reported to Sentry
}
return { success: true };
};
module.exports = reportErrors(testServer)
FAQs
A tiny module for sending Raven errors using Zeit's micro server framework
The npm package @ansaro/micro-raven-errors receives a total of 0 weekly downloads. As such, @ansaro/micro-raven-errors popularity was classified as not popular.
We found that @ansaro/micro-raven-errors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.