errors module

exception vdx_helper.errors.VDXError(code: HTTPStatus, message: str)

Bases: Exception

An exception class representing any error returned by the VDX Core API. It contains the respective status code as well as the corresponding error message

  • code (http.HTTPStatus) – The status code

  • message (str) – The error message

vdx_helper.errors.error_from_response(status: HTTPStatus, response: Response) VDXError

Maps a given error from an endpoint response to an exception with the correct status code and description of the error

  • status (HTTPStatus) – The status code of the endpoint response

  • response (requests.Response) – The endpoint response


A VDXError to be raised

Return type: