exceptions¶
Podman API Errors.
- exception APIError(message: str, response: Response | APIResponse | None = None, explanation: str | None = None)[source]¶
Bases:
HTTPError
Wraps HTTP errors for processing by the API and clients.
Initialize APIError.
- Parameters:
message – Message from service. Default: response.text, may be enhanced or wrapped by bindings
response – HTTP Response from service.
explanation – An enhanced or wrapped version of message with additional context.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- characters_written¶
- errno¶
POSIX exception code
- filename¶
exception filename
- filename2¶
second exception filename
- property status_code¶
HTTP status code from response.
- Type:
Optional[int]
- strerror¶
exception strerror
- exception BuildError(reason: str, build_log: Iterable[str])[source]¶
Bases:
PodmanError
Error occurred during build operation.
Initialize BuildError.
- Parameters:
reason – describes the error
build_log – build log output
- add_note()¶
Exception.add_note(note) – add a note to the exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception ContainerError(container: Container, exit_status: int, command: str | List[str], image: str, stderr: Iterable[str] | None = None)[source]¶
Bases:
PodmanError
Represents a container that has exited with a non-zero exit code.
Initialize ContainerError.
- Parameters:
container – Container that reported error.
exit_status – Non-zero status code from Container exit.
command – Command passed to container when created.
image – Name of image that was used to create container.
stderr – Errors reported by Container.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception ImageNotFound(message: str, response: Response | APIResponse | None = None, explanation: str | None = None)[source]¶
Bases:
APIError
Image not found on Podman service.
Initialize APIError.
- Parameters:
message – Message from service. Default: response.text, may be enhanced or wrapped by bindings
response – HTTP Response from service.
explanation – An enhanced or wrapped version of message with additional context.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- is_client_error() bool ¶
Returns True when request is incorrect.
- is_error() bool ¶
Returns True when HTTP operation resulted in an error.
- is_server_error() bool ¶
Returns True when error occurred in service.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- characters_written¶
- errno¶
POSIX exception code
- filename¶
exception filename
- filename2¶
second exception filename
- property status_code¶
HTTP status code from response.
- Type:
Optional[int]
- strerror¶
exception strerror
- exception InvalidArgument[source]¶
Bases:
PodmanError
Parameter to method/function was not valid.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception NotFound(message: str, response: Response | APIResponse | None = None, explanation: str | None = None)[source]¶
Bases:
APIError
Resource not found on Podman service.
Named for compatibility.
Initialize APIError.
- Parameters:
message – Message from service. Default: response.text, may be enhanced or wrapped by bindings
response – HTTP Response from service.
explanation – An enhanced or wrapped version of message with additional context.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- is_client_error() bool ¶
Returns True when request is incorrect.
- is_error() bool ¶
Returns True when HTTP operation resulted in an error.
- is_server_error() bool ¶
Returns True when error occurred in service.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- characters_written¶
- errno¶
POSIX exception code
- filename¶
exception filename
- filename2¶
second exception filename
- property status_code¶
HTTP status code from response.
- Type:
Optional[int]
- strerror¶
exception strerror