Exceptions
Exceptions of the Proxy passthrough.
Each one is an HTTP error response to the caller: its ProxyError.status and
ProxyError.code. They derive from Exception, not
SmarterException, which logs every instance as an error:
most of them are the caller’s mistakes, e.g. an unknown Proxy, and are logged as warnings.
- exception smarter.apps.proxy.exceptions.ProxyBudgetExceeded(message)[source]
Bases:
ProxyErrorA budget’s resource lock forbids charges to the Proxy, its Provider, the caller, or the caller’s account.
- exception smarter.apps.proxy.exceptions.ProxyConfigurationError(message)[source]
Bases:
ProxyErrorThe Proxy cannot forward requests: it has no base URL or API key, or its host is not allowed.
- exception smarter.apps.proxy.exceptions.ProxyError(message)[source]
Bases:
ExceptionBase class of the Proxy passthrough’s errors: a 502 Bad Gateway, unless a subclass says otherwise.
- exception smarter.apps.proxy.exceptions.ProxyInactive(message)[source]
Bases:
ProxyErrorThe Proxy is inactive: spec.isActive is false.
- exception smarter.apps.proxy.exceptions.ProxyNotFound(message)[source]
Bases:
ProxyErrorNo Proxy of that name exists that the caller may use.
- exception smarter.apps.proxy.exceptions.ProxyPathNotAllowed(message)[source]
Bases:
ProxyErrorThe path is not one of the Proxy’s spec.allowedPaths, or would leave its base URL.
- exception smarter.apps.proxy.exceptions.ProxyUpstreamError(message)[source]
Bases:
ProxyErrorThe provider’s API could not be reached.