here.platform.exceptions module
here.platform.exceptions module
This module contains all exception classes defined by the HERE Python SDK.
exception here.platform.exceptions.AuthenticationException(resp)
Bases: PlatformException
This AuthenticationException is raised either authentication or authorization on the platform fails.
exception here.platform.exceptions.CatalogConfigurationException
Bases: Exception
This CatalogConfigurationException is raised when the catalog configuration is invalid.
exception here.platform.exceptions.ConfigException
Bases: Exception
This ConfigException is raised whenever there is any error related to platform configuration.
exception here.platform.exceptions.DecodeException
Bases: Exception
Raised when data cannot be decoded from a source representation (content type).
exception here.platform.exceptions.DigestMismatchException(resp)
Bases: PlatformException
This DigestMismatchException is raised when the server detects that the digest provided for a piece of data doesn’t match the data itself, such as with an incomplete upload.
exception here.platform.exceptions.EncodeException
Bases: Exception
Raised when data cannot be encoded to a target representation (content type).
exception here.platform.exceptions.InequalReadsException(resp: ResponseProtocol)
Bases: PlatformException
Exception raised when the response content actual length differs from expected length.
This Exception is used at request method at base api. Useful for large data size when there are chances that inequal reads events might occur.
exception here.platform.exceptions.LayerConfigurationException
Bases: Exception
This LayerConfigurationException is raised when the layer configuration is invalid.
exception here.platform.exceptions.NonceAlreadyUsedException(resp)
Bases: AuthenticationException
This NonceAlreadyUsedException is raised if the server detects that the same nonce value for a given timestamp.
This nonce check is intended to protect against replay attacks, ensuring that the parameters for the signature (including nonce and timestamp) remain unique. However, it is possible that this unintentionally happens, in which case a retry is required.
AAA_ERROR_CODE = 401207
exception here.platform.exceptions.PayloadTooLargeException(resp: ResponseProtocol)
Bases: PlatformException
Exception raised for API HTTP response status code 513.
This is a dedicated exception to be used for interactive map layer. This exception will be raised when response payload is larger than the specified limits of the interactive map layer. The exception value will be the response object returned by requests which provides access to all its attributes, eg. status_code, reason and text, etc.
exception here.platform.exceptions.PlatformException(resp: ResponseProtocol)
Bases: Exception
Base class for HERE platform exceptions.
exception here.platform.exceptions.PublicationException(publication_id: str, publication_state: PublicationState)
Bases: Exception
This PublicationException is raised in case the publication is not finalized
successfully.
exception here.platform.exceptions.RequestEntityTooLargeException(resp: ResponseProtocol)
Bases: PlatformException
Exception raised for API HTTP response status code 413.
This is a dedicated exception to be used for interactive map layer. This exception will be raised when request body is larger than the specified limits of the interactive map layer. The exception value will be the response object returned by requests which provides access to all its attributes, eg. status_code, reason and text, etc.
exception here.platform.exceptions.ResourceLimitExceededException(resp)
Bases: PlatformException
This ResourceLimitExceededException is raised in below scenario
1.The maximum number of catalogs or layers possible for this organization have already been created. 2.Maximum storage capacity allocation has been reached for this layer type for this realm.
class here.platform.exceptions.ResponseProtocol(*args, **kwargs)
Bases: Protocol
Protocol defining the subset of Response API needed for exceptions.
property content: bytes
Raw response body content as bytes.
property headers: Mapping[str, str]
HTTP response headers as a mapping of header names to values.
property reason: str
HTTP reason phrase associated with the status code (e.g., ‘OK’, ‘Not Found’).
property status_code: int
HTTP status code of the response (e.g., 200, 404, 500).
property text: str
Response body content decoded as text.
property url: str
The URL that was requested.
exception here.platform.exceptions.SchemaException
Bases: Exception
This SchemaException is raised when something about a data schema is invalid.
exception here.platform.exceptions.ServiceUnavailableException(resp: ResponseProtocol)
Bases: PlatformException
Exception raised for API HTTP response status code 408, 500, 502, 503, or 504.
This is a dedicated exception to be used with the backoff package, because it requires a specific exception class. The exception value will be the response object returned by requests which provides access to all its attributes, eg. status_code, reason and text, etc.
exception here.platform.exceptions.TooManyRequestsException(resp: ResponseProtocol)
Bases: PlatformException
Exception raised for API HTTP response status code 429.
This is a dedicated exception to be used with the backoff package, because it requires a specific exception class. The exception value will be the response object returned by requests which provides access to all its attributes, eg. status_code, reason and text, etc.
exception here.platform.exceptions.UnsupportedContentTypeDecodeException(content_type: str)
Bases: DecodeException
Raised when trying to decode a content type that is not supported by the specified Adapter and corresponding Decoder.
exception here.platform.exceptions.UnsupportedContentTypeEncodeException(content_type: str)
Bases: EncodeException
Raised when trying to encode a content type that is not supported by the specified Adapter and corresponding Encoder.
exception here.platform.exceptions.UnsupportedOperationException(layer_id: str)
Bases: Exception
This UnsupportedOperationException is raised in case unsupported layer types are used.