All exceptions and errors from Node.js applications are automatically captured by Atatus. If you wish to send errors manually, you can do so by using the atatus.notifyError()
function. This function accepts two parameters. The second parameter is optional and accepts tags, customs data and user ID.
Syntax
atatus.notifyError(error, data_object)
Parameter
Parameter | Type | Description |
---|---|---|
error | Error Object/String (Required) | Error message or error object. |
data_object | Object (Optional) | Can be a tag, custom data or user ID. |
Example
copy
import atatus from "atatus-nodejs";
atatus.notifyError(new Error("error message"), {
tags: ['new-user', 'signup'],
customData: { name: 'John Doe', country: 'US' }
});