mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
show source chain in error response message
Error messages in logs should generally be similar to the messages in the response body now. There's a bit of a concern with the source chain leaking sensitive information, but the errors that had a source were generally already logging the second error in the chain in their own Display impl, so if this is a problem it's unlikely to be a regression.
This commit is contained in:
parent
a3448b5c84
commit
a2628357fd
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ use ruma::{
|
|||
OwnedServerName,
|
||||
};
|
||||
use thiserror::Error;
|
||||
use wee_woo::ErrorExt;
|
||||
|
||||
use crate::{observability::prelude::*, Ra};
|
||||
|
||||
|
|
@ -117,7 +118,7 @@ impl Error {
|
|||
return Ra(UiaaResponse::MatrixError(error));
|
||||
}
|
||||
|
||||
let message = format!("{self}");
|
||||
let message = format!("{}", self.display_with_sources(" -> "));
|
||||
|
||||
let (kind, status_code) = match self {
|
||||
Self::BadRequest(kind, _) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue