Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-22 05:10:29 +01:00
Update theerror format to show message in new Vault
Dieser Commit ist enthalten in:
Ursprung
3d1fc0f2e8
Commit
b3f3fd81ac
1 geänderte Dateien mit 10 neuen und 9 gelöschten Zeilen
19
src/util.rs
19
src/util.rs
|
@ -3,19 +3,20 @@
|
|||
///
|
||||
#[macro_export]
|
||||
macro_rules! err {
|
||||
($err:expr, $err_desc:expr, $msg:expr) => {{
|
||||
($err:expr, $msg:expr) => {{
|
||||
println!("ERROR: {}", $msg);
|
||||
err_json!(json!({
|
||||
"error": $err,
|
||||
"error_description": $err_desc,
|
||||
"ErrorModel": {
|
||||
"Message": $msg,
|
||||
"ValidationErrors": null,
|
||||
"Object": "error"
|
||||
}
|
||||
"Message": $err,
|
||||
"ValidationErrors": {
|
||||
"": [$msg,],
|
||||
},
|
||||
"ExceptionMessage": null,
|
||||
"ExceptionStackTrace": null,
|
||||
"InnerExceptionMessage": null,
|
||||
"Object": "error",
|
||||
}))
|
||||
}};
|
||||
($msg:expr) => { err!("default_error", "default_error_description", $msg) }
|
||||
($msg:expr) => { err!("The model state is invalid", $msg) }
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
|
|
Laden …
In neuem Issue referenzieren