1
0
Fork 0

Change error response to be closer to upstream

Dieser Commit ist enthalten in:
Daniel García 2018-10-10 20:37:04 +02:00
Ursprung f2078a3849
Commit ce4fedf191
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FC8A7D14C3CD543A

Datei anzeigen

@ -6,17 +6,18 @@ macro_rules! err {
($err:expr, $msg:expr) => {{
println!("ERROR: {}", $msg);
err_json!(json!({
"Message": $err,
"ValidationErrors": {
"": [$msg,],
},
"error": $err,
"error_description": $err,
"ErrorModel": {
"Message": $msg,
"ValidationErrors": null,
"ExceptionMessage": null,
"ExceptionStackTrace": null,
"InnerExceptionMessage": null,
"Object": "error",
}))
"Object": "error"
}}))
}};
($msg:expr) => { err!("The model state is invalid", $msg) }
($msg:expr) => { err!("unknown_error", $msg) }
}
#[macro_export]