Construct an SDK error or attach a local underlying cause.
Stable machine-readable failure category.
Human-readable context; never include caller audio or transcripts.
Optionaloptions: ErrorOptions
Optional native Error cause (not preserved across workers).
ReadonlycodeStable category for application branching.
ReadonlynameError name used by diagnostics and native Error tooling.
SDK failure with a stable code and optional local cause.
Branch on code instead of parsing messages. Worker transport retains the code and message but does not copy arbitrary stacks, causes, audio or transcript objects.
Example