Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-29 06:20:29 +01:00
Change error response to be closer to upstream
Dieser Commit ist enthalten in:
Ursprung
f2078a3849
Commit
ce4fedf191
1 geänderte Dateien mit 8 neuen und 7 gelöschten Zeilen
15
src/util.rs
15
src/util.rs
|
@ -6,17 +6,18 @@ macro_rules! err {
|
||||||
($err:expr, $msg:expr) => {{
|
($err:expr, $msg:expr) => {{
|
||||||
println!("ERROR: {}", $msg);
|
println!("ERROR: {}", $msg);
|
||||||
err_json!(json!({
|
err_json!(json!({
|
||||||
"Message": $err,
|
"error": $err,
|
||||||
"ValidationErrors": {
|
"error_description": $err,
|
||||||
"": [$msg,],
|
"ErrorModel": {
|
||||||
},
|
"Message": $msg,
|
||||||
|
"ValidationErrors": null,
|
||||||
"ExceptionMessage": null,
|
"ExceptionMessage": null,
|
||||||
"ExceptionStackTrace": null,
|
"ExceptionStackTrace": null,
|
||||||
"InnerExceptionMessage": null,
|
"InnerExceptionMessage": null,
|
||||||
"Object": "error",
|
"Object": "error"
|
||||||
}))
|
}}))
|
||||||
}};
|
}};
|
||||||
($msg:expr) => { err!("The model state is invalid", $msg) }
|
($msg:expr) => { err!("unknown_error", $msg) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
Laden …
In neuem Issue referenzieren