1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Capture better errors in Sentry

This commit is contained in:
Quentin Gliech
2023-01-31 15:42:54 +01:00
parent 875025467e
commit 87914cbcb3
19 changed files with 41 additions and 3 deletions

View File

@@ -52,6 +52,7 @@ impl<E: std::fmt::Debug + std::fmt::Display> From<E> for FancyError {
impl IntoResponse for FancyError {
fn into_response(self) -> Response {
let error = format!("{:?}", self.context);
sentry::capture_message(&error, sentry::Level::Error);
(
StatusCode::INTERNAL_SERVER_ERROR,
Extension(self.context),