pub fn get_error_message(format: Format) -> String