Module error_handler

Source
Expand description

Authentication errors that occur in the crate’s source code must be handled. Due to rusts limited capabilites to register / overwrite code from other traits some helper functions are provided to customize the error responses.

Functions§

overwrite_auth_error_message
Errors have a predfined text message that is returned in case an error occurs. This message can be overwritten by calling this function.
overwrite_auth_error_status_code
Errors have a predfined HTTP-Status code that is returned in case an error occurs. This status code can be overwritten by calling this function. The status code must be in the range: 100 <= code <= 1000
set_auth_error_content_type
Error responses return the content type header text/html; charset=utf-8 by default. The header value can be overwritten by calling this function.