Skip to main content

internal_error

Function internal_error 

Source
pub fn internal_error(context: &str, err: &dyn Display) -> Response
Expand description

Log a failed backend operation and return it as a 500 Internal Server Error JSON response ("{context}: {err}").

Handlers use this instead of swallowing the error, so API callers can tell an outage apart from “no data”.