From 219d0ff75dc93486c3c8be4828aaeb94da53e1d1 Mon Sep 17 00:00:00 2001 From: Dagur Valberg Johannsson Date: Fri, 14 Feb 2025 20:43:51 +0100 Subject: [PATCH] missing file --- src/rpc/err.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/rpc/err.rs diff --git a/src/rpc/err.rs b/src/rpc/err.rs new file mode 100644 index 0000000..3c1fbf4 --- /dev/null +++ b/src/rpc/err.rs @@ -0,0 +1,5 @@ +use rocket::{http::Status, response::status::Custom}; + +pub fn to_internal_error(e: E) -> Custom { + Custom(Status::InternalServerError, format!("Error: {}", e)) +}