podman-ts defines a structured error hierarchy so you can catch specific failure modes without inspecting raw HTTP status codes or string messages. All classes are named exports fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt
Use this file to discover all available pages before exploring further.
@pratyay360/podman-ts.
Error hierarchy
Error class reference
PodmanError
PodmanError
Base class for all podman-ts errors. Extends the built-in Constructor
Catch this class to handle any SDK-level error regardless of its specific type.
Error.| Property | Type | Description |
|---|---|---|
message | string | Human-readable error description. |
name | string | Always "PodmanError". |
APIError
APIError
Wraps HTTP error responses from the Podman service. Thrown by Constructor
Methods
APIResponse.raiseForStatus() for any status >= 400 that is not a 404.| Property | Type | Description |
|---|---|---|
message | string | Short error description, taken from the cause field of the response body when available. |
statusCode | number | undefined | HTTP status code returned by the service. |
explanation | string | undefined | Secondary description, taken from the message field of the response body. |
name | string | Always "APIError". |
| Method | Returns | Description |
|---|---|---|
isClientError() | boolean | true when statusCode is 400–499. |
isServerError() | boolean | true when statusCode is 500–599. |
toString() | string | Formats the error as "{statusCode} Client/Server Error: {message} ({explanation})". |
NotFound
NotFound
Thrown by Constructor
APIResponse.raiseForStatus() when the Podman service returns a 404 response for a generic resource.| Property | Type | Description |
|---|---|---|
statusCode | number | Always 404. |
name | string | Always "NotFound". |
ImageNotFound
ImageNotFound
Thrown for 404 responses specific to image lookups, when the calling code passes Constructor
ImageNotFound as the NotFoundClass argument to raiseForStatus().| Property | Type | Description |
|---|---|---|
statusCode | number | Always 404. |
name | string | Always "ImageNotFound". |
BuildError
BuildError
Thrown when an image build operation fails. Includes the accumulated build log so you can display or inspect the output that led to the failure.Constructor
| Property | Type | Description |
|---|---|---|
message | string | Short description of the build failure. |
buildLog | string[] | Ordered list of build output lines captured before the failure. Defaults to []. |
name | string | Always "BuildError". |
ContainerError
ContainerError
Thrown when a container exits with a non-zero status code, e.g. from Constructor
containers.run().| Property | Type | Description |
|---|---|---|
message | string | Human-readable description. |
exitStatus | number | The process exit code returned by the container. |
name | string | Always "ContainerError". |
InvalidArgument
InvalidArgument
Thrown by SDK methods when a caller passes a value that does not satisfy the method’s preconditions.Constructor
| Property | Type | Description |
|---|---|---|
message | string | Description of what was invalid. |
name | string | Always "InvalidArgument". |
StreamParseError
StreamParseError
Thrown when the SDK fails to parse a value from a streaming JSON response.ConstructorThe
cause is coerced to a string and embedded in the message: "Stream parse error: {cause}".| Property | Type | Description |
|---|---|---|
message | string | "Stream parse error: {cause}" |
name | string | Always "StreamParseError". |