riftenlabs-indexer/src/rpc/err.rs

6 lines
195 B
Rust
Raw Normal View History

2025-02-14 20:43:51 +01:00
use rocket::{http::Status, response::status::Custom};
pub fn to_internal_error<E: std::fmt::Display>(e: E) -> Custom<String> {
Custom(Status::InternalServerError, format!("Error: {}", e))
}