from_header_to_err_code_msg

Function from_header_to_err_code_msg 

Source
pub fn from_header_to_err_code_msg(
    headers: &HeaderMap,
) -> Option<(StatusCode, &str)>
Expand description

Extract StatusCode and error message from [HeaderMap], if any.

Note that if the StatusCode is illegal, for example, a random number that is not pre-defined as a StatusCode, the result is still None.