MCPcopy Create free account
hub / github.com/bitswired/rustgpt / internal_error

Function internal_error

src/main.rs:126–131  ·  view source on GitHub ↗

Utility function for mapping any error into a `500 Internal Server Error` response.

(err: E)

Source from the content-addressed store, hash-verified

124/// Utility function for mapping any error into a `500 Internal Server Error`
125/// response.
126fn internal_error<E>(err: E) -> (StatusCode, String)
127where
128 E: std::error::Error,
129{
130 (StatusCode::INTERNAL_SERVER_ERROR, err.to_string())
131}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected