Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: Sentry should report exceptions in initialising environment #572

Closed
istreeter opened this issue Mar 22, 2022 · 0 comments
Closed

Comments

@istreeter
Copy link
Contributor

Concerning this method here. Currently, the sendToSentry function is called whenever an exception is raised inside the environment.use block. However, if the exception is raised when creating the environment then the program flow never gets as far as this block.

The correct implementation should look more like this:

environment.use { env =>
  // do something with environment
}.recoverWith {
  case e: Throwable =>
  // send to sentry here
}

But it can't be exactly like that, because currently the sentry client is part of the environment.

@istreeter istreeter changed the title Sentry should report exceptions in initialising environment common: Sentry should report exceptions in initialising environment Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant