summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-14 00:37:03 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-14 00:37:03 +0100
commit6a901654fac3952c953bafd4ac378ba1ebc648c3 (patch)
treecf98dff3de15fc18bb2cfd02e9f7da7c5cf62f99 /src
parent44a35e651741afb6c417da47d636e4380cdd225f (diff)
chore: rename error key for responder
Diffstat (limited to 'src')
-rw-r--r--src/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/errors.rs b/src/errors.rs
index ee3ca71..082315e 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -62,7 +62,7 @@ impl fmt::Display for AppError {
#[derive(Serialize)]
pub struct AppErrorResponse {
- pub error: String,
+ pub detail: String,
}
impl ResponseError for AppError {
@@ -74,7 +74,7 @@ impl ResponseError for AppError {
}
fn error_response(&self) -> HttpResponse {
HttpResponse::build(self.status_code()).json(AppErrorResponse {
- error: self.message(),
+ detail: self.message(),
})
}
}