The setCustomData()
function helps you to debug and fix errors easily.
Syntax
atatus.setCustomData(custom_object)
Parameter
Parameter | Type | Description |
---|---|---|
custom_object | Object (Required) | Custom data object. |
Example
You can pass the custom data object to the config call() as follows.
copy
atatus.config('YOUR_API_KEY', { customData: { name: "John Doe" } }).install();
The setCustomData() can be set as follows.
copy
atatus.setCustomData({
name: "John Doe",
plan: "premium",
beta_access: true
});
You can pass custom data as a second paramter during a notify call. This lets you send variables from catch blocks.
copy
atatus.notify(err, { name: "John Doe" });
Note:
Custom data cannot be searched. If you want to search for a particular error, then use tags.