errors

Module Contents

Classes

DockerException() A base class from which all other exceptions inherit.
APIError(self,message,response=None,explanation=None) An HTTP error from the API.
NotFound()
ImageNotFound()
InvalidVersion()
InvalidRepository()
InvalidConfigFile()
InvalidArgument()
DeprecatedMethod()
TLSParameterError(self,msg)
NullResource()
ContainerError(self,container,exit_status,command,image,stderr) Represents a container that has exited with a non-zero exit code.
StreamParseError(self,reason)
BuildError(self,reason,build_log)
ImageLoadError()

Functions

create_api_error_from_http_exception(e) Create a suitable APIError from requests.exceptions.HTTPError.
create_unexpected_kwargs_error(name,kwargs)
class DockerException

A base class from which all other exceptions inherit.

If you want to catch all errors that the Docker SDK might raise, catch this base exception.

create_api_error_from_http_exception(e)

Create a suitable APIError from requests.exceptions.HTTPError.

class APIError(message, response=None, explanation=None)

An HTTP error from the API.

__init__(message, response=None, explanation=None)
__str__()
status_code()
is_client_error()
is_server_error()
class NotFound
class ImageNotFound
class InvalidVersion
class InvalidRepository
class InvalidConfigFile
class InvalidArgument
class DeprecatedMethod
class TLSParameterError(msg)
__init__(msg)
__str__()
class NullResource
class ContainerError(container, exit_status, command, image, stderr)

Represents a container that has exited with a non-zero exit code.

__init__(container, exit_status, command, image, stderr)
class StreamParseError(reason)
__init__(reason)
class BuildError(reason, build_log)
__init__(reason, build_log)
class ImageLoadError
create_unexpected_kwargs_error(name, kwargs)