Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()