aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/util.rs b/src/util.rs
index 6f8d6edf..714d19d0 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -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]