From 6a901654fac3952c953bafd4ac378ba1ebc648c3 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 14 Mar 2021 00:37:03 +0100 Subject: chore: rename error key for responder --- src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(), }) } } -- cgit v1.2.3-18-g5258