here_location_services.exceptions module

This module defines API exceptions.

exception here_location_services.exceptions.ApiError[source]

Bases: Exception

Exception raised for API HTTP response status codes not in [200…300).

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.

__str__()[source]

Return a string from the HTTP response causing the exception.

The string simply lists the repsonse’s status code, reason and text content, separated with commas.

exception here_location_services.exceptions.ConfigException[source]

Bases: Exception

This ConfigException is raised whenever there is any error related to platform configuration.

exception here_location_services.exceptions.AuthenticationException(resp)[source]

Bases: Exception

This AuthenticationException is raised either authentication or authorization on the platform fails.

__init__(resp)[source]

Instantiate AuthenticationException . :param resp: response detail will be stored in this param

__str__()[source]

Return the message to be raised for this exception.

Returns

error message

Return type

str

exception here_location_services.exceptions.TooManyRequestsException(resp)[source]

Bases: Exception

Exception raised for API HTTP response status code 429.

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.

__init__(resp)[source]

Instantiate AuthenticationException . :param resp: response detail will be stored in this param

__str__()[source]

Return a string from the HTTP response causing the exception.

The string simply lists the response status code, reason and text content, separated with commas.