Skip to content
Snippets Groups Projects
Unverified Commit ce4fedf1 authored by Daniel García's avatar Daniel García
Browse files

Change error response to be closer to upstream

parent f2078a38
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,18 @@ macro_rules! err { ...@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment