DaytonaException
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_APIString - Wire-formatsourcevalues set by the translation layer when a Daytona service stamps them on the wire envelope. Anullsourcemeans the response did not carry a structured envelope (treat as opaque).SOURCE_DAEMONString -SOURCE_PROXYString -
Constructors
new DaytonaException()
public DaytonaException(String message)Creates a generic Daytona exception.
Parameters:
messageString - error description
new DaytonaException()
public DaytonaException(String message, Throwable cause)Creates a generic Daytona exception with a cause.
Parameters:
messageString - error descriptioncauseThrowable - root cause
new DaytonaException()
public DaytonaException(int statusCode, String message)Creates a Daytona exception with explicit HTTP status code.
Parameters:
statusCodeint - HTTP status codemessageString - error description
new DaytonaException()
public DaytonaException(int statusCode, String message, Throwable cause)Creates a Daytona exception with explicit HTTP status code and a cause.
Parameters:
statusCodeint - HTTP status codemessageString - error descriptioncauseThrowable - root cause
new DaytonaException()
public DaytonaException(int statusCode, String message, Map<String, String> headers)Creates a Daytona exception with HTTP status code and headers.
Parameters:
statusCodeint - HTTP status codemessageString - error descriptionheadersMap<String, String> - response headers
new DaytonaException()
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:
statusCodeint - HTTP status codemessageString - error descriptionheadersMap<String, String> - response headerscodeString - machine-readable error codesourceString - component that originated the error
new DaytonaException()
public DaytonaException(int statusCode, String message, String code, String source)Creates a Daytona exception with HTTP status code, error code, and source.
Parameters:
statusCodeint - HTTP status codemessageString - error descriptioncodeString - machine-readable error codesourceString - component that originated the error
new DaytonaException()
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:
statusCodeint - HTTP status codemessageString - error descriptioncauseThrowable - root causecodeString - machine-readable error codesourceString - component that originated the error
Methods
setPendingHeaders()
public static void setPendingHeaders(Map<String, String> headers)Parameters:
headersMap<String, String> -
clearPendingHeaders()
public static void clearPendingHeaders()getStatusCode()
public int getStatusCode()Returns the HTTP status code, or 0 if not applicable.
Returns:
int-
getHeaders()
public Map<String, String> getHeaders()Returns the HTTP response headers, or an empty map if not available.
Returns:
Map\<String, String\>-
getCode()
public String getCode()Returns the machine-readable error code, or null if not available.
Returns:
String-
getSource()
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-
DaytonaA11yUnavailableException
The accessibility (AT-SPI) bus is not reachable.
Subclass of DaytonaServiceUnavailableException.
Constructors
new DaytonaA11yUnavailableException()
public DaytonaA11yUnavailableException(String message)Parameters:
messageString -
new DaytonaA11yUnavailableException()
public DaytonaA11yUnavailableException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaA11yUnavailableException()
public DaytonaA11yUnavailableException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaA11yUnavailableException()
public DaytonaA11yUnavailableException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaAuthenticationException
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_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaAuthenticationException()
public DaytonaAuthenticationException(String message)Creates an authentication exception.
Parameters:
messageString - error description from the API
new DaytonaAuthenticationException()
public DaytonaAuthenticationException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaAuthenticationException()
public DaytonaAuthenticationException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaAuthenticationException()
public DaytonaAuthenticationException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaBadGatewayException
Raised for HTTP 502 — an upstream dependency rejected or dropped the request.
Properties:
STATUS_CODEint -
Constructors
new DaytonaBadGatewayException()
public DaytonaBadGatewayException(String message)Parameters:
messageString -
new DaytonaBadGatewayException()
public DaytonaBadGatewayException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaBadGatewayException()
public DaytonaBadGatewayException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaBadGatewayException()
public DaytonaBadGatewayException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaBadRequestException
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_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaBadRequestException()
public DaytonaBadRequestException(String message)Creates a bad-request exception.
Parameters:
messageString - error description from the API
new DaytonaBadRequestException()
public DaytonaBadRequestException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaBadRequestException()
public DaytonaBadRequestException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaBadRequestException()
public DaytonaBadRequestException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaCommandAlreadyCompletedException
The shell command already finished.
Subclass of DaytonaGoneException.
Constructors
new DaytonaCommandAlreadyCompletedException()
public DaytonaCommandAlreadyCompletedException(String message)Parameters:
messageString -
new DaytonaCommandAlreadyCompletedException()
public DaytonaCommandAlreadyCompletedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaCommandAlreadyCompletedException()
public DaytonaCommandAlreadyCompletedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaCommandAlreadyCompletedException()
public DaytonaCommandAlreadyCompletedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaConflictException
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_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaConflictException()
public DaytonaConflictException(String message)Creates a conflict exception.
Parameters:
messageString - error description from the API
new DaytonaConflictException()
public DaytonaConflictException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaConflictException()
public DaytonaConflictException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaConflictException()
public DaytonaConflictException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaConnectionException
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());
}Constructors
new DaytonaConnectionException()
public DaytonaConnectionException(String message)Creates a connection exception.
Parameters:
messageString - connection failure description
new DaytonaConnectionException()
public DaytonaConnectionException(String message, Throwable cause)Creates a connection exception with a cause.
Parameters:
messageString - connection failure descriptioncauseThrowable - root cause
new DaytonaConnectionException()
public DaytonaConnectionException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaConnectionException()
public DaytonaConnectionException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaConnectionTimeoutException
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.
Constructors
new DaytonaConnectionTimeoutException()
public DaytonaConnectionTimeoutException(String message)Parameters:
messageString -
new DaytonaConnectionTimeoutException()
public DaytonaConnectionTimeoutException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaConnectionTimeoutException()
public DaytonaConnectionTimeoutException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaConnectionTimeoutException()
public DaytonaConnectionTimeoutException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaFileAccessDeniedException
Insufficient permissions for the filesystem operation.
Subclass of DaytonaForbiddenException.
Constructors
new DaytonaFileAccessDeniedException()
public DaytonaFileAccessDeniedException(String message)Parameters:
messageString -
new DaytonaFileAccessDeniedException()
public DaytonaFileAccessDeniedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaFileAccessDeniedException()
public DaytonaFileAccessDeniedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaFileAccessDeniedException()
public DaytonaFileAccessDeniedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaFileNotFoundException
Filesystem entry was not found.
Subclass of DaytonaNotFoundException.
Constructors
new DaytonaFileNotFoundException()
public DaytonaFileNotFoundException(String message)Parameters:
messageString -
new DaytonaFileNotFoundException()
public DaytonaFileNotFoundException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaFileNotFoundException()
public DaytonaFileNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaFileNotFoundException()
public DaytonaFileNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaFileReadFailedException
Daemon could not read the requested file (code FILE_READ_FAILED, HTTP 500).
Subclass of DaytonaInternalServerException.
Constructors
new DaytonaFileReadFailedException()
public DaytonaFileReadFailedException(String message)Parameters:
messageString -
new DaytonaFileReadFailedException()
public DaytonaFileReadFailedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaFileReadFailedException()
public DaytonaFileReadFailedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaFileReadFailedException()
public DaytonaFileReadFailedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaForbiddenException
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_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaForbiddenException()
public DaytonaForbiddenException(String message)Creates a forbidden exception.
Parameters:
messageString - error description from the API
new DaytonaForbiddenException()
public DaytonaForbiddenException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaForbiddenException()
public DaytonaForbiddenException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaForbiddenException()
public DaytonaForbiddenException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitAuthFailedException
Git authentication credentials were rejected by the remote.
Subclass of DaytonaAuthenticationException.
Constructors
new DaytonaGitAuthFailedException()
public DaytonaGitAuthFailedException(String message)Parameters:
messageString -
new DaytonaGitAuthFailedException()
public DaytonaGitAuthFailedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitAuthFailedException()
public DaytonaGitAuthFailedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitAuthFailedException()
public DaytonaGitAuthFailedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitBranchExistsException
A git branch with this name already exists.
Subclass of DaytonaConflictException.
Constructors
new DaytonaGitBranchExistsException()
public DaytonaGitBranchExistsException(String message)Parameters:
messageString -
new DaytonaGitBranchExistsException()
public DaytonaGitBranchExistsException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitBranchExistsException()
public DaytonaGitBranchExistsException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitBranchExistsException()
public DaytonaGitBranchExistsException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitBranchNotFoundException
The requested git branch does not exist.
Subclass of DaytonaNotFoundException.
Constructors
new DaytonaGitBranchNotFoundException()
public DaytonaGitBranchNotFoundException(String message)Parameters:
messageString -
new DaytonaGitBranchNotFoundException()
public DaytonaGitBranchNotFoundException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitBranchNotFoundException()
public DaytonaGitBranchNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitBranchNotFoundException()
public DaytonaGitBranchNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitDirtyWorktreeException
Worktree has uncommitted changes.
Subclass of DaytonaConflictException.
Constructors
new DaytonaGitDirtyWorktreeException()
public DaytonaGitDirtyWorktreeException(String message)Parameters:
messageString -
new DaytonaGitDirtyWorktreeException()
public DaytonaGitDirtyWorktreeException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitDirtyWorktreeException()
public DaytonaGitDirtyWorktreeException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitDirtyWorktreeException()
public DaytonaGitDirtyWorktreeException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitMergeConflictException
Git merge has conflicts that need manual resolution.
Subclass of DaytonaConflictException.
Constructors
new DaytonaGitMergeConflictException()
public DaytonaGitMergeConflictException(String message)Parameters:
messageString -
new DaytonaGitMergeConflictException()
public DaytonaGitMergeConflictException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitMergeConflictException()
public DaytonaGitMergeConflictException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitMergeConflictException()
public DaytonaGitMergeConflictException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitPushRejectedException
Git push was rejected (non-fast-forward / stale ref).
Subclass of DaytonaConflictException.
Constructors
new DaytonaGitPushRejectedException()
public DaytonaGitPushRejectedException(String message)Parameters:
messageString -
new DaytonaGitPushRejectedException()
public DaytonaGitPushRejectedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitPushRejectedException()
public DaytonaGitPushRejectedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitPushRejectedException()
public DaytonaGitPushRejectedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitRemoteRejectedException
The git remote rejected the operation (hooks, branch protection or quota).
Subclass of DaytonaUnprocessableEntityException.
Constructors
new DaytonaGitRemoteRejectedException()
public DaytonaGitRemoteRejectedException(String message)Parameters:
messageString -
new DaytonaGitRemoteRejectedException()
public DaytonaGitRemoteRejectedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitRemoteRejectedException()
public DaytonaGitRemoteRejectedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitRemoteRejectedException()
public DaytonaGitRemoteRejectedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitRepoNotFoundException
The requested git repository does not exist.
Subclass of DaytonaNotFoundException.
Constructors
new DaytonaGitRepoNotFoundException()
public DaytonaGitRepoNotFoundException(String message)Parameters:
messageString -
new DaytonaGitRepoNotFoundException()
public DaytonaGitRepoNotFoundException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitRepoNotFoundException()
public DaytonaGitRepoNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitRepoNotFoundException()
public DaytonaGitRepoNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGitTransportFailedException
The git remote was unreachable (DNS, TLS, connection or timeout failure).
Subclass of DaytonaBadGatewayException.
Constructors
new DaytonaGitTransportFailedException()
public DaytonaGitTransportFailedException(String message)Parameters:
messageString -
new DaytonaGitTransportFailedException()
public DaytonaGitTransportFailedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGitTransportFailedException()
public DaytonaGitTransportFailedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGitTransportFailedException()
public DaytonaGitTransportFailedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaGoneException
Raised for HTTP 410 — the target resource is permanently gone.
Properties:
STATUS_CODEint -
Constructors
new DaytonaGoneException()
public DaytonaGoneException(String message)Parameters:
messageString -
new DaytonaGoneException()
public DaytonaGoneException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaGoneException()
public DaytonaGoneException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaGoneException()
public DaytonaGoneException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaInternalServerException
Raised for HTTP 500 — server-side bug or unhandled condition.
Properties:
STATUS_CODEint -
Constructors
new DaytonaInternalServerException()
public DaytonaInternalServerException(String message)Parameters:
messageString -
new DaytonaInternalServerException()
public DaytonaInternalServerException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaInternalServerException()
public DaytonaInternalServerException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaInternalServerException()
public DaytonaInternalServerException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaInvalidFilePathException
Supplied file path was rejected by the daemon (code INVALID_FILE_PATH, HTTP 400).
Subclass of DaytonaBadRequestException.
Constructors
new DaytonaInvalidFilePathException()
public DaytonaInvalidFilePathException(String message)Parameters:
messageString -
new DaytonaInvalidFilePathException()
public DaytonaInvalidFilePathException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaInvalidFilePathException()
public DaytonaInvalidFilePathException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaInvalidFilePathException()
public DaytonaInvalidFilePathException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaLspServerNotInitializedException
LSP server must be started via /lsp/start first.
Subclass of DaytonaBadRequestException.
Constructors
new DaytonaLspServerNotInitializedException()
public DaytonaLspServerNotInitializedException(String message)Parameters:
messageString -
new DaytonaLspServerNotInitializedException()
public DaytonaLspServerNotInitializedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaLspServerNotInitializedException()
public DaytonaLspServerNotInitializedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaLspServerNotInitializedException()
public DaytonaLspServerNotInitializedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaNotFoundException
Raised when a requested resource does not exist (HTTP 404).
Properties:
STATUS_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaNotFoundException()
public DaytonaNotFoundException(String message)Creates a not-found exception.
Parameters:
messageString - error description from the API
new DaytonaNotFoundException()
public DaytonaNotFoundException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaNotFoundException()
public DaytonaNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaNotFoundException()
public DaytonaNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaProcessExecutionTimeoutException
A process exceeded its configured execution timeout.
Subclass of DaytonaTimeoutException.
Constructors
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(String message)Parameters:
messageString -
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(int statusCode, String message, String code, String source)Parameters:
statusCodeint -messageString -codeString -sourceString -
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(int statusCode, String message, Throwable cause, String code, String source)Parameters:
statusCodeint -messageString -causeThrowable -codeString -sourceString -
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaProcessExecutionTimeoutException()
public DaytonaProcessExecutionTimeoutException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaProcessNotFoundException
The requested process is not running.
Subclass of DaytonaNotFoundException.
Constructors
new DaytonaProcessNotFoundException()
public DaytonaProcessNotFoundException(String message)Parameters:
messageString -
new DaytonaProcessNotFoundException()
public DaytonaProcessNotFoundException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaProcessNotFoundException()
public DaytonaProcessNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaProcessNotFoundException()
public DaytonaProcessNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaRateLimitException
Raised when API rate limits are exceeded (HTTP 429).
Properties:
STATUS_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaRateLimitException()
public DaytonaRateLimitException(String message)Creates a rate-limit exception.
Parameters:
messageString - error description from the API
new DaytonaRateLimitException()
public DaytonaRateLimitException(String message, Throwable cause)Parameters:
messageString - error description from the APIcauseThrowable - root cause
new DaytonaRateLimitException()
public DaytonaRateLimitException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaRateLimitException()
public DaytonaRateLimitException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaRecordingFfmpegNotFoundException
ffmpeg binary is not installed; required for recording.
Subclass of DaytonaServiceUnavailableException.
Constructors
new DaytonaRecordingFfmpegNotFoundException()
public DaytonaRecordingFfmpegNotFoundException(String message)Parameters:
messageString -
new DaytonaRecordingFfmpegNotFoundException()
public DaytonaRecordingFfmpegNotFoundException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaRecordingFfmpegNotFoundException()
public DaytonaRecordingFfmpegNotFoundException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaRecordingFfmpegNotFoundException()
public DaytonaRecordingFfmpegNotFoundException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaRecordingStillActiveException
The recording is still running; stop it first.
Subclass of DaytonaConflictException.
Constructors
new DaytonaRecordingStillActiveException()
public DaytonaRecordingStillActiveException(String message)Parameters:
messageString -
new DaytonaRecordingStillActiveException()
public DaytonaRecordingStillActiveException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaRecordingStillActiveException()
public DaytonaRecordingStillActiveException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaRecordingStillActiveException()
public DaytonaRecordingStillActiveException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaServerException
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");
}Constructors
new DaytonaServerException()
public DaytonaServerException(int statusCode, String message)Creates a server exception.
Parameters:
statusCodeint - HTTP status code (typically 5xx)messageString - error description from the API
new DaytonaServerException()
public DaytonaServerException(int statusCode, String message, Throwable cause)Parameters:
statusCodeint - HTTP status code (typically 5xx)messageString - error description from the APIcauseThrowable - root cause
new DaytonaServerException()
public DaytonaServerException(int statusCode, String message, String code, String source)Parameters:
statusCodeint -messageString -codeString -sourceString -
new DaytonaServerException()
public DaytonaServerException(int statusCode, String message, Throwable cause, String code, String source)Parameters:
statusCodeint -messageString -causeThrowable -codeString -sourceString -
DaytonaServiceUnavailableException
Raised for HTTP 503 — the service is temporarily refusing traffic.
Properties:
STATUS_CODEint -
Constructors
new DaytonaServiceUnavailableException()
public DaytonaServiceUnavailableException(String message)Parameters:
messageString -
new DaytonaServiceUnavailableException()
public DaytonaServiceUnavailableException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaServiceUnavailableException()
public DaytonaServiceUnavailableException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaServiceUnavailableException()
public DaytonaServiceUnavailableException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaSessionEndedException
The shell session has ended.
Subclass of DaytonaGoneException.
Constructors
new DaytonaSessionEndedException()
public DaytonaSessionEndedException(String message)Parameters:
messageString -
new DaytonaSessionEndedException()
public DaytonaSessionEndedException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaSessionEndedException()
public DaytonaSessionEndedException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaSessionEndedException()
public DaytonaSessionEndedException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaTimeoutException
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_CODEint -
Constructors
new DaytonaTimeoutException()
public DaytonaTimeoutException(String message, Throwable cause)Creates a timeout exception with a cause.
Parameters:
messageString - timeout descriptioncauseThrowable - root cause
new DaytonaTimeoutException()
public DaytonaTimeoutException(String message)Creates a timeout exception.
Parameters:
messageString - timeout description
new DaytonaTimeoutException()
public DaytonaTimeoutException(int statusCode, String message, String code, String source)Parameters:
statusCodeint -messageString -codeString -sourceString -
new DaytonaTimeoutException()
public DaytonaTimeoutException(int statusCode, String message, Throwable cause, String code, String source)Parameters:
statusCodeint -messageString -causeThrowable -codeString -sourceString -
new DaytonaTimeoutException()
public DaytonaTimeoutException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaTimeoutException()
public DaytonaTimeoutException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaUnprocessableEntityException
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_CODEint - HTTP status code carried by every instance of this class.
Constructors
new DaytonaUnprocessableEntityException()
public DaytonaUnprocessableEntityException(String message)Parameters:
messageString -
new DaytonaUnprocessableEntityException()
public DaytonaUnprocessableEntityException(String message, Throwable cause)Parameters:
messageString -causeThrowable -
new DaytonaUnprocessableEntityException()
public DaytonaUnprocessableEntityException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaUnprocessableEntityException()
public DaytonaUnprocessableEntityException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -
DaytonaValidationException
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.
Constructors
new DaytonaValidationException()
public DaytonaValidationException(String message)Creates a validation exception.
Parameters:
messageString - error description
new DaytonaValidationException()
public DaytonaValidationException(String message, Throwable cause)Creates a validation exception with a cause.
Parameters:
messageString - error descriptioncauseThrowable - root cause
new DaytonaValidationException()
public DaytonaValidationException(String message, String code, String source)Parameters:
messageString -codeString -sourceString -
new DaytonaValidationException()
public DaytonaValidationException(String message, Throwable cause, String code, String source)Parameters:
messageString -causeThrowable -codeString -sourceString -