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)) +}