Skip to content

Type Alias: SandboxErrorCode

ts
type SandboxErrorCode = 
  | "TIMEOUT"
  | "MEMORY"
  | "SYNTAX"
  | "RUNTIME"
  | "OUTPUT_TOO_LARGE"
  | "INVALID_CODE"
  | "UNAVAILABLE"
  | "ABORTED";

Defined in: packages/core/src/sandbox/SandboxEngine.ts:102

Error codes for sandbox execution failures.

  • TIMEOUT: Script exceeded the time limit
  • MEMORY: Isolate ran out of memory (auto-recovered)
  • SYNTAX: JavaScript syntax error in the provided code
  • RUNTIME: Script threw an error during execution
  • OUTPUT_TOO_LARGE: Result exceeds maxOutputBytes
  • INVALID_CODE: Failed the SandboxGuard fail-fast check
  • UNAVAILABLE: isolated-vm is not installed
  • ABORTED: Execution was cancelled via AbortSignal (client disconnect)