Replies: 1 comment 8 replies
-
I am currently just wrapping handler in this code but it doesn't feel right: public function handle($event, BrefContext $context) {
try {
// handler body
} catch (\Throwable $exception) {
\Sentry\captureException($exception);
throw $exception;
}
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can you please help me integrate Sentry? I have tried to just add
\Sentry\init(['dsn' => $_ENV['SENTRY_DSN']]);
to handler, but that doesn't catch anything. My guess is that bref is already doing error handling and I would have to inject Sentry somewhere to send unhandled exceptions manually.I have tried to search documentation but there is only mention (https://bref.sh/docs/environment/logs.html#php-errors-and-warnings) that errors are written to logs but no information on how to extend it.
Can you please point me to right direction? Thank you
Beta Was this translation helpful? Give feedback.
All reactions