pub fn format_api_errors(raw: String) -> String
Return a formatted error message from the API if present, or raw value if not