Exceptions¶
- exception PatcherError(message: str = None, **kwargs)[source]¶
Base exception class for Patcher exceptions.
Carries arbitrary keyword context (e.g.
status_code=401,url=...,not_found=True) and renders it into the formatted message asmessage (key1: val1 | key2: val2).Important
Each keyword in
kwargsis also set as an instance attribute (see the loop below). This is load-bearing; multiple callers rely ongetattr(err, "not_found", False)to short-circuit on 404 responses (notablypatcher.clients.installomator.InstallomatorClient.match()). Removing thesetattrloop in favor of “just storing kwargs inself.context” looks like cleanup but silently breaks the 404 short-circuit. The context dict is preserved separately for the message formatter.- Parameters:
message (str)
- exception SetupError(message: str = None, **kwargs)[source]¶
Raised if any errors occur during automatic setup.
- Parameters:
message (str)
- exception CredentialError(message: str = None, **kwargs)[source]¶
Raised if any errors occur during saving or updating credentials.
- Parameters:
message (str)
- exception APIResponseError(message: str = None, **kwargs)[source]¶
Raised when an API Call receives an unsuccessful status code.
- Parameters:
message (str)