aboutsummaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/errors.rs b/src/errors.rs
index f6e00e2..e32c6d5 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -2,9 +2,9 @@ use hex::FromHexError;
use ring::error::KeyRejected;
use thiserror::Error;
-use axum::response::{Response, IntoResponse};
-use axum::http::StatusCode;
use axum::body;
+use axum::http::StatusCode;
+use axum::response::{IntoResponse, Response};
use axum::Json;
use ring::error::Unspecified as RingUnspecified;
@@ -56,7 +56,6 @@ pub type NoneResult = std::result::Result<(), ServiceError>;
impl IntoResponse for ServiceError {
fn into_response(self) -> Response {
-
let body = body::boxed(body::Full::from(self.to_string()));
let status = match self {
@@ -64,9 +63,6 @@ impl IntoResponse for ServiceError {
ServiceError::NotAuthorized => StatusCode::UNAUTHORIZED,
_ => StatusCode::INTERNAL_SERVER_ERROR,
};
- Response::builder()
- .status(status)
- .body(body)
- .unwrap()
+ Response::builder().status(status).body(body).unwrap()
}
}