diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-03-14 00:37:03 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-03-14 00:37:03 +0100 |
commit | 6a901654fac3952c953bafd4ac378ba1ebc648c3 (patch) | |
tree | cf98dff3de15fc18bb2cfd02e9f7da7c5cf62f99 /src | |
parent | 44a35e651741afb6c417da47d636e4380cdd225f (diff) |
chore: rename error key for responder
Diffstat (limited to 'src')
-rw-r--r-- | src/errors.rs | 4 |
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(), }) } } |