riftenlabs-indexer/src/rpc/err.rs
Dagur Valberg Johannsson 7d9352cf53
Fix clippy issues
2025-07-16 13:52:46 +02:00

10 lines
444 B
Rust

// Copyright (C) 2024 Riften Labs AS
//
// This software is licensed under the GNU Affero General Public License (AGPL), version 3.0 or later.
// A copy of the license can be found in the LICENSE file or at https://www.gnu.org/licenses/agpl-3.0.html
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}"))
}