Skip to content
View as Markdown

Base exception for all Daytona SDK errors.

Subclasses map to specific HTTP status codes and allow callers to catch precise failure conditions without string-parsing error messages:

try {
Sandbox sandbox = daytona.sandbox().get("nonexistent-id");
} catch (DaytonaNotFoundException e) {
// sandbox does not exist
} catch (DaytonaAuthenticationException e) {
// invalid API key
} catch (DaytonaException e) {
// other SDK error
}

Properties:

  • SOURCE_API String - Wire-format source values set by the translation layer when a Daytona service stamps them on the wire envelope. A null source means the response did not carry a structured envelope (treat as opaque).
  • SOURCE_DAEMON String -
  • SOURCE_PROXY String -
public DaytonaException(String message)

Creates a generic Daytona exception.

Parameters:

  • message String - error description
public DaytonaException(String message, Throwable cause)

Creates a generic Daytona exception with a cause.

Parameters:

  • message String - error description
  • cause Throwable - root cause
public DaytonaException(int statusCode, String message)

Creates a Daytona exception with explicit HTTP status code.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
public DaytonaException(int statusCode, String message, Throwable cause)

Creates a Daytona exception with explicit HTTP status code and a cause.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
  • cause Throwable - root cause
public DaytonaException(int statusCode, String message, Map<String, String> headers)

Creates a Daytona exception with HTTP status code and headers.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
  • headers Map<String, String> - response headers
public DaytonaException(int statusCode, String message, Map<String, String> headers, String code, String source)

Creates a Daytona exception with HTTP status code, headers, error code, and source.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
  • headers Map<String, String> - response headers
  • code String - machine-readable error code
  • source String - component that originated the error
public DaytonaException(int statusCode, String message, String code, String source)

Creates a Daytona exception with HTTP status code, error code, and source.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
  • code String - machine-readable error code
  • source String - component that originated the error
public DaytonaException(int statusCode, String message, Throwable cause, String code, String source)

Creates a Daytona exception with HTTP status code, cause, error code, and source.

Parameters:

  • statusCode int - HTTP status code
  • message String - error description
  • cause Throwable - root cause
  • code String - machine-readable error code
  • source String - component that originated the error
public static void setPendingHeaders(Map<String, String> headers)

Parameters:

  • headers Map<String, String> -
public static void clearPendingHeaders()
public int getStatusCode()

Returns the HTTP status code, or 0 if not applicable.

Returns:

  • int -
public Map<String, String> getHeaders()

Returns the HTTP response headers, or an empty map if not available.

Returns:

  • Map\<String, String\> -
public String getCode()

Returns the machine-readable error code, or null if not available.

Returns:

  • String -
public String getSource()

Returns the originating service from the wire envelope. null for SDK-side errors and for responses that don’t carry the envelope. Otherwise one of #SOURCE_API, #SOURCE_DAEMON or #SOURCE_PROXY.

Returns:

  • String -

The accessibility (AT-SPI) bus is not reachable.

Subclass of DaytonaServiceUnavailableException.

public DaytonaA11yUnavailableException(String message)

Parameters:

  • message String -
public DaytonaA11yUnavailableException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaA11yUnavailableException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaA11yUnavailableException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when API credentials are missing or invalid (HTTP 401).

try {
daytona.sandbox().create();
} catch (DaytonaAuthenticationException e) {
System.err.println("Invalid or missing API key");
}

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaAuthenticationException(String message)

Creates an authentication exception.

Parameters:

  • message String - error description from the API
public DaytonaAuthenticationException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaAuthenticationException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaAuthenticationException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for HTTP 502 — an upstream dependency rejected or dropped the request.

Properties:

  • STATUS_CODE int -
public DaytonaBadGatewayException(String message)

Parameters:

  • message String -
public DaytonaBadGatewayException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaBadGatewayException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaBadGatewayException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when the request is malformed or contains invalid parameters (HTTP 400).

try {
daytona.sandbox().create(params);
} catch (DaytonaBadRequestException e) {
System.err.println("Invalid request parameters: " + e.getMessage());
}

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaBadRequestException(String message)

Creates a bad-request exception.

Parameters:

  • message String - error description from the API
public DaytonaBadRequestException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaBadRequestException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaBadRequestException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The shell command already finished.

Subclass of DaytonaGoneException.

new DaytonaCommandAlreadyCompletedException()

Section titled “new DaytonaCommandAlreadyCompletedException()”
public DaytonaCommandAlreadyCompletedException(String message)

Parameters:

  • message String -

new DaytonaCommandAlreadyCompletedException()

Section titled “new DaytonaCommandAlreadyCompletedException()”
public DaytonaCommandAlreadyCompletedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -

new DaytonaCommandAlreadyCompletedException()

Section titled “new DaytonaCommandAlreadyCompletedException()”
public DaytonaCommandAlreadyCompletedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -

new DaytonaCommandAlreadyCompletedException()

Section titled “new DaytonaCommandAlreadyCompletedException()”
public DaytonaCommandAlreadyCompletedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when an operation conflicts with the current state (HTTP 409).

Common causes: creating a resource with a name that already exists, or performing an operation incompatible with the resource’s current state.

try {
daytona.snapshot().create(params);
} catch (DaytonaConflictException e) {
System.err.println("A snapshot with this name already exists");
}

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaConflictException(String message)

Creates a conflict exception.

Parameters:

  • message String - error description from the API
public DaytonaConflictException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaConflictException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaConflictException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for network-level connection failures (no HTTP response received).

Raised when the SDK cannot reach the Daytona API due to network issues such as DNS failure, connection refused, or TLS errors.

try {
daytona.sandbox().create();
} catch (DaytonaConnectionException e) {
System.err.println("Cannot reach Daytona API: " + e.getMessage());
}
public DaytonaConnectionException(String message)

Creates a connection exception.

Parameters:

  • message String - connection failure description
public DaytonaConnectionException(String message, Throwable cause)

Creates a connection exception with a cause.

Parameters:

  • message String - connection failure description
  • cause Throwable - root cause
public DaytonaConnectionException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaConnectionException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when the transport layer times out connecting to or reading from a Daytona service. Subclass of DaytonaConnectionException so callers can catch the broader “connection failed” category.

public DaytonaConnectionTimeoutException(String message)

Parameters:

  • message String -
public DaytonaConnectionTimeoutException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaConnectionTimeoutException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaConnectionTimeoutException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Insufficient permissions for the filesystem operation.

Subclass of DaytonaForbiddenException.

public DaytonaFileAccessDeniedException(String message)

Parameters:

  • message String -
public DaytonaFileAccessDeniedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaFileAccessDeniedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaFileAccessDeniedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Filesystem entry was not found.

Subclass of DaytonaNotFoundException.

public DaytonaFileNotFoundException(String message)

Parameters:

  • message String -
public DaytonaFileNotFoundException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaFileNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaFileNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Daemon could not read the requested file (code FILE_READ_FAILED, HTTP 500).

Subclass of DaytonaInternalServerException.

public DaytonaFileReadFailedException(String message)

Parameters:

  • message String -
public DaytonaFileReadFailedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaFileReadFailedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaFileReadFailedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when the authenticated user lacks permission to perform an operation (HTTP 403).

try {
daytona.sandbox().delete(sandboxId);
} catch (DaytonaForbiddenException e) {
System.err.println("Not authorized to delete this sandbox");
}

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaForbiddenException(String message)

Creates a forbidden exception.

Parameters:

  • message String - error description from the API
public DaytonaForbiddenException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaForbiddenException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaForbiddenException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Git authentication credentials were rejected by the remote.

Subclass of DaytonaAuthenticationException.

public DaytonaGitAuthFailedException(String message)

Parameters:

  • message String -
public DaytonaGitAuthFailedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitAuthFailedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitAuthFailedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

A git branch with this name already exists.

Subclass of DaytonaConflictException.

public DaytonaGitBranchExistsException(String message)

Parameters:

  • message String -
public DaytonaGitBranchExistsException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitBranchExistsException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitBranchExistsException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The requested git branch does not exist.

Subclass of DaytonaNotFoundException.

public DaytonaGitBranchNotFoundException(String message)

Parameters:

  • message String -
public DaytonaGitBranchNotFoundException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitBranchNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitBranchNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Worktree has uncommitted changes.

Subclass of DaytonaConflictException.

public DaytonaGitDirtyWorktreeException(String message)

Parameters:

  • message String -
public DaytonaGitDirtyWorktreeException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitDirtyWorktreeException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitDirtyWorktreeException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Git merge has conflicts that need manual resolution.

Subclass of DaytonaConflictException.

public DaytonaGitMergeConflictException(String message)

Parameters:

  • message String -
public DaytonaGitMergeConflictException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitMergeConflictException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitMergeConflictException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Git push was rejected (non-fast-forward / stale ref).

Subclass of DaytonaConflictException.

public DaytonaGitPushRejectedException(String message)

Parameters:

  • message String -
public DaytonaGitPushRejectedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitPushRejectedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitPushRejectedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The git remote rejected the operation (hooks, branch protection or quota).

Subclass of DaytonaUnprocessableEntityException.

public DaytonaGitRemoteRejectedException(String message)

Parameters:

  • message String -
public DaytonaGitRemoteRejectedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitRemoteRejectedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitRemoteRejectedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The requested git repository does not exist.

Subclass of DaytonaNotFoundException.

public DaytonaGitRepoNotFoundException(String message)

Parameters:

  • message String -
public DaytonaGitRepoNotFoundException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitRepoNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitRepoNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The git remote was unreachable (DNS, TLS, connection or timeout failure).

Subclass of DaytonaBadGatewayException.

public DaytonaGitTransportFailedException(String message)

Parameters:

  • message String -
public DaytonaGitTransportFailedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGitTransportFailedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGitTransportFailedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for HTTP 410 — the target resource is permanently gone.

Properties:

  • STATUS_CODE int -
public DaytonaGoneException(String message)

Parameters:

  • message String -
public DaytonaGoneException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaGoneException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaGoneException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for HTTP 500 — server-side bug or unhandled condition.

Properties:

  • STATUS_CODE int -
public DaytonaInternalServerException(String message)

Parameters:

  • message String -
public DaytonaInternalServerException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaInternalServerException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaInternalServerException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Supplied file path was rejected by the daemon (code INVALID_FILE_PATH, HTTP 400).

Subclass of DaytonaBadRequestException.

public DaytonaInvalidFilePathException(String message)

Parameters:

  • message String -
public DaytonaInvalidFilePathException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaInvalidFilePathException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaInvalidFilePathException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

LSP server must be started via /lsp/start first.

Subclass of DaytonaBadRequestException.

new DaytonaLspServerNotInitializedException()

Section titled “new DaytonaLspServerNotInitializedException()”
public DaytonaLspServerNotInitializedException(String message)

Parameters:

  • message String -

new DaytonaLspServerNotInitializedException()

Section titled “new DaytonaLspServerNotInitializedException()”
public DaytonaLspServerNotInitializedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -

new DaytonaLspServerNotInitializedException()

Section titled “new DaytonaLspServerNotInitializedException()”
public DaytonaLspServerNotInitializedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -

new DaytonaLspServerNotInitializedException()

Section titled “new DaytonaLspServerNotInitializedException()”
public DaytonaLspServerNotInitializedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when a requested resource does not exist (HTTP 404).

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaNotFoundException(String message)

Creates a not-found exception.

Parameters:

  • message String - error description from the API
public DaytonaNotFoundException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

A process exceeded its configured execution timeout.

Subclass of DaytonaTimeoutException.

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(String message)

Parameters:

  • message String -

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(int statusCode, String message, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • code String -
  • source String -

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(int statusCode, String message, Throwable cause, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • cause Throwable -
  • code String -
  • source String -

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -

new DaytonaProcessExecutionTimeoutException()

Section titled “new DaytonaProcessExecutionTimeoutException()”
public DaytonaProcessExecutionTimeoutException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The requested process is not running.

Subclass of DaytonaNotFoundException.

public DaytonaProcessNotFoundException(String message)

Parameters:

  • message String -
public DaytonaProcessNotFoundException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaProcessNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaProcessNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when API rate limits are exceeded (HTTP 429).

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaRateLimitException(String message)

Creates a rate-limit exception.

Parameters:

  • message String - error description from the API
public DaytonaRateLimitException(String message, Throwable cause)

Parameters:

  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaRateLimitException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaRateLimitException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

ffmpeg binary is not installed; required for recording.

Subclass of DaytonaServiceUnavailableException.

new DaytonaRecordingFfmpegNotFoundException()

Section titled “new DaytonaRecordingFfmpegNotFoundException()”
public DaytonaRecordingFfmpegNotFoundException(String message)

Parameters:

  • message String -

new DaytonaRecordingFfmpegNotFoundException()

Section titled “new DaytonaRecordingFfmpegNotFoundException()”
public DaytonaRecordingFfmpegNotFoundException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -

new DaytonaRecordingFfmpegNotFoundException()

Section titled “new DaytonaRecordingFfmpegNotFoundException()”
public DaytonaRecordingFfmpegNotFoundException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -

new DaytonaRecordingFfmpegNotFoundException()

Section titled “new DaytonaRecordingFfmpegNotFoundException()”
public DaytonaRecordingFfmpegNotFoundException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The recording is still running; stop it first.

Subclass of DaytonaConflictException.

new DaytonaRecordingStillActiveException()

Section titled “new DaytonaRecordingStillActiveException()”
public DaytonaRecordingStillActiveException(String message)

Parameters:

  • message String -

new DaytonaRecordingStillActiveException()

Section titled “new DaytonaRecordingStillActiveException()”
public DaytonaRecordingStillActiveException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -

new DaytonaRecordingStillActiveException()

Section titled “new DaytonaRecordingStillActiveException()”
public DaytonaRecordingStillActiveException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -

new DaytonaRecordingStillActiveException()

Section titled “new DaytonaRecordingStillActiveException()”
public DaytonaRecordingStillActiveException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for unexpected server-side failures (HTTP 5xx).

These are typically transient and safe to retry with exponential backoff.

try {
daytona.sandbox().create();
} catch (DaytonaServerException e) {
System.err.println("Server error (status " + e.getStatusCode() + "), retry later");
}
public DaytonaServerException(int statusCode, String message)

Creates a server exception.

Parameters:

  • statusCode int - HTTP status code (typically 5xx)
  • message String - error description from the API
public DaytonaServerException(int statusCode, String message, Throwable cause)

Parameters:

  • statusCode int - HTTP status code (typically 5xx)
  • message String - error description from the API
  • cause Throwable - root cause
public DaytonaServerException(int statusCode, String message, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • code String -
  • source String -
public DaytonaServerException(int statusCode, String message, Throwable cause, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for HTTP 503 — the service is temporarily refusing traffic.

Properties:

  • STATUS_CODE int -
public DaytonaServiceUnavailableException(String message)

Parameters:

  • message String -
public DaytonaServiceUnavailableException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaServiceUnavailableException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaServiceUnavailableException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

The shell session has ended.

Subclass of DaytonaGoneException.

public DaytonaSessionEndedException(String message)

Parameters:

  • message String -
public DaytonaSessionEndedException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaSessionEndedException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaSessionEndedException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised when an SDK operation times out.

Client-side transport timeouts default to HTTP 408, but mapped HTTP 504 (or any server-supplied timeout status) is preserved when available.

Properties:

  • STATUS_CODE int -
public DaytonaTimeoutException(String message, Throwable cause)

Creates a timeout exception with a cause.

Parameters:

  • message String - timeout description
  • cause Throwable - root cause
public DaytonaTimeoutException(String message)

Creates a timeout exception.

Parameters:

  • message String - timeout description
public DaytonaTimeoutException(int statusCode, String message, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • code String -
  • source String -
public DaytonaTimeoutException(int statusCode, String message, Throwable cause, String code, String source)

Parameters:

  • statusCode int -
  • message String -
  • cause Throwable -
  • code String -
  • source String -
public DaytonaTimeoutException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaTimeoutException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for HTTP 422 — the request is well-formed but semantically invalid (e.g. unsupported resource class, invalid configuration values).

try {
daytona.sandbox().create(params);
} catch (DaytonaUnprocessableEntityException e) {
System.err.println("Unprocessable entity: " + e.getMessage());
}

Properties:

  • STATUS_CODE int - HTTP status code carried by every instance of this class.
public DaytonaUnprocessableEntityException(String message)

Parameters:

  • message String -
public DaytonaUnprocessableEntityException(String message, Throwable cause)

Parameters:

  • message String -
  • cause Throwable -
public DaytonaUnprocessableEntityException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaUnprocessableEntityException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -

Raised for semantic validation failures (HTTP 422).

The mapper throws this subclass for 422 responses so that pre-existing catch (DaytonaValidationException e) blocks keep matching, while catch (DaytonaUnprocessableEntityException e) also matches via the parent class.

Exists for backward compatibility only. Deleting this class (and switching the 422 case in ExceptionMapper back to the parent) is the whole removal.

Deprecated: Use DaytonaUnprocessableEntityException instead.

public DaytonaValidationException(String message)

Creates a validation exception.

Parameters:

  • message String - error description
public DaytonaValidationException(String message, Throwable cause)

Creates a validation exception with a cause.

Parameters:

  • message String - error description
  • cause Throwable - root cause
public DaytonaValidationException(String message, String code, String source)

Parameters:

  • message String -
  • code String -
  • source String -
public DaytonaValidationException(String message, Throwable cause, String code, String source)

Parameters:

  • message String -
  • cause Throwable -
  • code String -
  • source String -