Sentry with Sapphire?

Sapphire handles all errors for me so they don't go into Sentry, what should I do?
Solution:
You should capture the error manually, for example in a listener, you can do:```ts // Other imports import { captureException } from '@sentry/node'; export class UserListener extends Listener<typeof Events.ListenerError> {...
Jump to solution
1 Reply
Solution
kyra
kyra5mo ago
You should capture the error manually, for example in a listener, you can do:
// Other imports
import { captureException } from '@sentry/node';

export class UserListener extends Listener<typeof Events.ListenerError> {
public run(error: Error, context: ListenerErrorPayload) {
captureException(error, { tags: { name: context.piece.name } });
}
}
// Other imports
import { captureException } from '@sentry/node';

export class UserListener extends Listener<typeof Events.ListenerError> {
public run(error: Error, context: ListenerErrorPayload) {
captureException(error, { tags: { name: context.piece.name } });
}
}
Want results from more Discord servers?
Add your server