Skip to main content

into_server_error

Function into_server_error 

Source
pub fn into_server_error<E: ToString>(error: E) -> Response
Expand description

Converts any error-type into a http-response with status-code 500

The response has content-type set to text/plain; charset=utf-8 and the body contains the error message as string.