Exceptions#

exception blacksmith.domain.exceptions.ConfigurationError(client: str, service: Tuple[str, Optional[str]], other: Tuple[str, Optional[str]])#

Raised if there is a conflict for client and service.

exception blacksmith.domain.exceptions.UnregisteredServiceException(service: str, version: Optional[str])#

Raised when an unregistered service is being requested.

exception blacksmith.domain.exceptions.UnregisteredClientException(client: str)#

Raised when an unregistered client is being requested.

exception blacksmith.domain.exceptions.UnregisteredResourceException(resource: str, client: str)#

Raised when an unregistered resource is being requested.

exception blacksmith.domain.exceptions.UnregisteredRouteException(route: Literal['HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], resource: str, client: str)#

Raised when an unregistered route is being requested.

exception blacksmith.domain.exceptions.NoContractException(method: Literal['HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], resource: str, client: str)#

Raised when an unregistered contract is being requested.

exception blacksmith.domain.exceptions.UnregisteredContentTypeException(content_type: str, request: Request)#

Raised when an unregistered contract is being requested.

exception blacksmith.domain.exceptions.NoResponseSchemaException(method: Literal['HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], path: str, resource: str, client: str)#

Raised when an unregistered response schema is being requested.

exception blacksmith.domain.exceptions.WrongRequestTypeException(type: Type[Any], route: Literal['HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], resource: str, client: str)#
exception blacksmith.domain.exceptions.HTTPError(message: str, request: HTTPRequest, response: HTTPResponse)#

Represent the http error.

property status_code: int#
property json: Optional[Any]#
property is_client_error: bool#
property is_server_error: bool#
exception blacksmith.domain.exceptions.HTTPTimeoutError#

Represent the http timeout error.