2025-02-15 09:15:22 +01:00
|
|
|
// 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
|
|
|
|
|
|
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> {
|
2025-07-16 09:31:14 +02:00
|
|
|
Custom(Status::InternalServerError, format!("Error: {e}"))
|
2025-02-14 20:43:51 +01:00
|
|
|
}
|