Skip to main content

create_json_error_response_handler

Function create_json_error_response_handler 

Source
pub fn create_json_error_response_handler<F>(
    error_to_message_and_code: F,
) -> ResponseHandler<AiMuxError>
where F: Fn(&Value) -> ProviderErrorParts + Send + 'static,
Expand description

Parse an error JSON and map its data to a provider message and code.