maps.exceptions module

This module defines exceptions.

exception maps.exceptions.ApiKeyNotFoundError(message, ctx=None)[source]

Bases: click.exceptions.UsageError

Exception raised when API KEY for provider is not provided as option and it is not present in respected environment variable.

exception maps.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.