6 lines
195 B
Rust
6 lines
195 B
Rust
|
|
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))
|
||
|
|
}
|