pyowm.exceptions package¶
Submodules¶
pyowm.exceptions.api_call_error module¶
Module containing APICallError class
-
exception
pyowm.exceptions.api_call_error.
APICallError
(message, triggering_error=None)[source]¶ Bases:
pyowm.exceptions.OWMError
Error class that represents network/infrastructural failures when invoking OWM Weather API, in example due to network errors.
Parameters: - message (str) – the message of the error
- triggering_error (an Exception subtype) – optional Exception object that triggered this
error (defaults to
None
)
-
exception
pyowm.exceptions.api_call_error.
APICallTimeoutError
(message, triggering_error=None)[source]¶ Bases:
pyowm.exceptions.api_call_error.APICallError
Error class that represents response timeout conditions
Parameters: - message (str) – the message of the error
- triggering_error (an Exception subtype) – optional Exception object that triggered this
error (defaults to
None
)
-
exception
pyowm.exceptions.api_call_error.
APIInvalidSSLCertificateError
(message, triggering_error=None)[source]¶ Bases:
pyowm.exceptions.api_call_error.APICallError
Error class that represents failure in verifying the SSL certificate provided by the OWM API
Parameters: - message (str) – the message of the error
- triggering_error (an Exception subtype) – optional Exception object that triggered this
error (defaults to
None
)
-
exception
pyowm.exceptions.api_call_error.
BadGatewayError
(message, triggering_error=None)[source]¶ Bases:
pyowm.exceptions.api_call_error.APICallError
Error class that represents 502 errors - i.e when upstream backend cannot communicate with API gateways.
Parameters: - message (str) – the message of the error
- triggering_error (an Exception subtype) – optional Exception object that triggered this
error (defaults to
None
)
pyowm.exceptions.api_response_error module¶
Module containing APIResponseError class
-
exception
pyowm.exceptions.api_response_error.
APIResponseError
(cause, status_code)[source]¶ Bases:
pyowm.exceptions.OWMError
Error class that represents HTTP error status codes in OWM Weather API responses.
Parameters: - cause (str) – the message of the error
- status_code (int) – the HTTP error status code
Returns: a APIResponseError instance
-
exception
pyowm.exceptions.api_response_error.
NotFoundError
(cause, status_code=404)[source]¶ Bases:
pyowm.exceptions.api_response_error.APIResponseError
Error class that represents the situation when an entity is not found into a collection of entities.
Parameters: - cause (str) – the message of the error
- status_code (int) – the HTTP error status code
Returns: a NotFoundError instance
Bases:
pyowm.exceptions.api_response_error.APIResponseError
Error class that represents the situation when an entity cannot be retrieved due to user subscription unsufficient capabilities.
Parameters: - cause (str) – the message of the error
- status_code (int) – the HTTP error status code
Returns: a UnauthorizedError instance
pyowm.exceptions.parse_response_error module¶
Module containing ParseResponseError class
-
exception
pyowm.exceptions.parse_response_error.
ParseResponseError
(cause)[source]¶ Bases:
pyowm.exceptions.OWMError
Error class that represents failures when parsing payload data in HTTP responses sent by the OWM Weather API.
Parameters: cause (str) – the message of the error Returns: a ParseResponseError instance