You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
templates: fix the _ function not working in macros
This commit is contained in:
@@ -15,8 +15,9 @@
|
||||
use axum::{
|
||||
http::StatusCode,
|
||||
response::{IntoResponse, Response},
|
||||
Extension,
|
||||
Extension, TypedHeader,
|
||||
};
|
||||
use headers::ContentType;
|
||||
use mas_templates::ErrorContext;
|
||||
|
||||
use crate::sentry::SentryEventID;
|
||||
@@ -60,10 +61,11 @@ 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);
|
||||
let error = format!("{}", self.context);
|
||||
let event_id = sentry::capture_message(&error, sentry::Level::Error);
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
TypedHeader(ContentType::text()),
|
||||
SentryEventID::from(event_id),
|
||||
Extension(self.context),
|
||||
error,
|
||||
|
Reference in New Issue
Block a user