def raise_error(error_type: str) -> None:
    """Raise the appropriate error based on error message."""
    try:
        error = next((v for k, v in ERROR_CODES.items() if k in error_type))
    except StopIteration:
        error = AirVisualError
    raise error(error_type)
Raise the appropriate error based on error message.