summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs
index ffc90e9..6e797b4 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -16,9 +16,9 @@ type BoxedError = Box<dyn error::Error + Send + Sync>;
// Returns a 500 Internal Server Error to the client. Meant to be used via the
// `?` operator; _does not_ return the originating error to the client.
#[derive(Debug)]
-pub struct InternalError(Id, BoxedError);
+pub struct Internal(Id, BoxedError);
-impl<E> From<E> for InternalError
+impl<E> From<E> for Internal
where
E: Into<BoxedError>,
{
@@ -28,13 +28,13 @@ where
}
}
-impl IntoResponse for InternalError {
+impl IntoResponse for Internal {
fn into_response(self) -> Response {
let Self(id, error) = self;
eprintln!("hi: [{id}] {error}");
(
StatusCode::INTERNAL_SERVER_ERROR,
- format!("internal server error\nerror id: {}", id),
+ format!("internal server error\nerror id: {id}"),
)
.into_response()
}