Skip to content

sandbox-failure

A location in the submitted program, never in the host’s source.

new SourceInvalid(args): SourceInvalid

string

number

number

string

SourceInvalid

Data.TaggedError("SourceInvalid")< SandboxFailureReference & { readonly line: number; readonly column: number; readonly excerpt: string; } >.constructor

readonly optional ref?: string

Data.TaggedError("SourceInvalid").ref

readonly line: number

Data.TaggedError("SourceInvalid").line

readonly column: number

Data.TaggedError("SourceInvalid").column

readonly excerpt: string

Data.TaggedError("SourceInvalid").excerpt


Text captured inside the guest’s own exception handler.

new GuestThrew(args): GuestThrew

string

string

string

string

string

Safe provider envelope carried in the guest exception’s cause, never model text.

GuestThrew

Data.TaggedError(“GuestThrew”)< SandboxFailureReference & { readonly name: string; readonly message: string; readonly missingVariable?: string | undefined; /** Safe provider envelope carried in the guest exception’s cause, never model text. */ readonly transportMessage?: string | undefined; } >.constructor

readonly optional ref?: string

Data.TaggedError("GuestThrew").ref

readonly optional missingVariable?: string

Data.TaggedError("GuestThrew").missingVariable

readonly optional transportMessage?: string

Safe provider envelope carried in the guest exception’s cause, never model text.

Data.TaggedError("GuestThrew").transportMessage

name: string

Data.TaggedError("GuestThrew").name

message: string

Data.TaggedError("GuestThrew").message


The invocation owner decided its execution budget was spent.

new DeadlineExceeded(args): DeadlineExceeded

string

number

number

boolean

DeadlineExceeded

Data.TaggedError(“DeadlineExceeded”)< SandboxFailureReference & { readonly limitMs: number; readonly elapsedMs: number; readonly acknowledged?: boolean | undefined; } >.constructor

readonly optional ref?: string

Data.TaggedError("DeadlineExceeded").ref

readonly limitMs: number

Data.TaggedError("DeadlineExceeded").limitMs

readonly elapsedMs: number

Data.TaggedError("DeadlineExceeded").elapsedMs

readonly optional acknowledged?: boolean

Data.TaggedError("DeadlineExceeded").acknowledged


The invocation owner accepted cancellation.

new Cancelled(args): Cancelled

string

"caller" | "operator"

boolean

Cancelled

Data.TaggedError(“Cancelled”)< SandboxFailureReference & { readonly by: “caller” | “operator”; readonly acknowledged?: boolean | undefined; } >.constructor

readonly optional ref?: string

Data.TaggedError("Cancelled").ref

readonly by: "caller" | "operator"

Data.TaggedError("Cancelled").by

readonly optional acknowledged?: boolean

Data.TaggedError("Cancelled").acknowledged


Dispatch started, but its transport did not deliver an answer.

new DispatchLost(args): DispatchLost

string

number

string

string

unknown

DispatchLost

Data.TaggedError(“DispatchLost”)< SandboxFailureReference & { readonly elapsedMs: number; readonly transport: string; readonly errno?: string | undefined; readonly rawCause: unknown; } >.constructor

readonly optional ref?: string

Data.TaggedError("DispatchLost").ref

readonly elapsedMs: number

Data.TaggedError("DispatchLost").elapsedMs

readonly transport: string

Data.TaggedError("DispatchLost").transport

readonly optional errno?: string

Data.TaggedError("DispatchLost").errno

readonly rawCause: unknown

Data.TaggedError("DispatchLost").rawCause


The sandbox process could not start or stopped before answering.

new SandboxCrashed(args): SandboxCrashed

string

number

string

unknown

SandboxCrashed

Data.TaggedError(“SandboxCrashed”)< SandboxFailureReference & { readonly exit?: number | undefined; readonly errno?: string | undefined; readonly rawCause: unknown; } >.constructor

readonly optional ref?: string

Data.TaggedError("SandboxCrashed").ref

readonly optional exit?: number

Data.TaggedError("SandboxCrashed").exit

readonly optional errno?: string

Data.TaggedError("SandboxCrashed").errno

readonly rawCause: unknown

Data.TaggedError("SandboxCrashed").rawCause


A received envelope could not be decoded. Its reason is operator only.

new BadResponse(args): BadResponse

string

string

unknown

BadResponse

Data.TaggedError("BadResponse")< SandboxFailureReference & { readonly reason: string; readonly rawCause: unknown; } >.constructor

readonly optional ref?: string

Data.TaggedError("BadResponse").ref

readonly reason: string

Data.TaggedError("BadResponse").reason

readonly rawCause: unknown

Data.TaggedError("BadResponse").rawCause


A JSON result exceeded Mycelium’s output budget.

new ResultTooLarge(args): ResultTooLarge

string

number

ResultTooLarge

Data.TaggedError("ResultTooLarge")< SandboxFailureReference & { readonly size: number; } >.constructor

readonly optional ref?: string

Data.TaggedError("ResultTooLarge").ref

readonly size: number

Data.TaggedError("ResultTooLarge").size


A result could not be represented as JSON.

new ResultNotJson(args): ResultNotJson

string

string

unknown

ResultNotJson

Data.TaggedError("ResultNotJson")< SandboxFailureReference & { readonly kind: string; readonly rawCause?: unknown; } >.constructor

readonly optional ref?: string

Data.TaggedError("ResultNotJson").ref

readonly kind: string

Data.TaggedError("ResultNotJson").kind

readonly optional rawCause?: unknown

Data.TaggedError("ResultNotJson").rawCause


Failure at a named capability boundary, with an owner-admitted diagnostic.

new CapabilityFailed(fields): CapabilityFailed

Retain the admitted diagnostic for ordinary Error consumers through the same safe projection.

CapabilityFailureFields

CapabilityFailed

Data.TaggedError( "CapabilityFailed", )<CapabilityFailureFields>.constructor

readonly optional ref?: string

Data.TaggedError( "CapabilityFailed", ).ref

readonly namespace: string

Data.TaggedError( "CapabilityFailed", ).namespace

readonly operation: string

Data.TaggedError( "CapabilityFailed", ).operation

readonly optional rawCause?: unknown

Data.TaggedError( "CapabilityFailed", ).rawCause

cause: Readonly<{ kind: "Files" | "Forage" | "InvalidInput" | "Unavailable" | "OperationFailed"; message: string; }>

Data.TaggedError( "CapabilityFailed", ).cause


A foreign throw violated the typed adapter contract.

new Unknown(args): Unknown

string

unknown

Unknown

Data.TaggedError("Unknown")< SandboxFailureReference & { readonly rawCause: unknown; } >.constructor

readonly optional ref?: string

Data.TaggedError("Unknown").ref

readonly rawCause: unknown

Data.TaggedError("Unknown").rawCause

SandboxFailureReference = object

Optional source reference carried by sandbox failures.

readonly optional ref?: string


CapabilityDiagnostic = Readonly<{ kind: "Files" | "Forage" | "InvalidInput" | "Unavailable" | "OperationFailed"; message: string; }>

A capability owner explicitly admits this bounded diagnostic as safe.


CapabilityFailureFields = object

Fields admitted by a capability owner, with the original cause kept private.

readonly optional ref?: string

readonly namespace: string

readonly operation: string

readonly cause: CapabilityDiagnostic

readonly optional rawCause?: unknown


SandboxFailure = SourceInvalid | GuestThrew | DeadlineExceeded | Cancelled | DispatchLost | SandboxCrashed | BadResponse | ResultTooLarge | ResultNotJson | CapabilityFailed | Unknown

Closed error channel shared by sandbox adapters and the invocation owner.

referenceSandboxFailure(failure, ref): SandboxFailure

Copy the failure to correlate one execution without mutating shared host errors.

SandboxFailure

string

SandboxFailure


sandboxFailureMessage(failure, includeReference?): string

The sole model projection. Transport, parser and raw cause fields stay private.

SandboxFailure

boolean = true

string