How to use the smartcar.exceptions.GatewayTimeoutException function in smartcar

To help you get started, we’ve selected a few smartcar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github smartcar / python-sdk / smartcar / requester.py View on Github external
elif code == 404:
        raise E.ResourceNotFoundException(response)
    elif code == 409:
        raise E.StateException(response)
    elif code == 429:
        raise E.RateLimitingException(response)
    elif code == 430:
        raise E.MonthlyLimitExceeded(response)
    elif code == 500:
        raise E.ServerException(response)
    elif code == 501:
        if body['error'] == 'smartcar_not_capable_error':
            raise E.SmartcarNotCapableException(response)
        raise E.VehicleNotCapableException(response)
    elif code == 504:
        raise E.GatewayTimeoutException(response)
    else:
        response.raise_for_status()