Skip to content

Defined in: sdk/js/src/errors.ts:6

The host refused a call (FORBIDDEN, NOT_FOUND, RATE_LIMITED, NOT_GRANTED, …).

  • Error

new ZaunError(code, detail?, retryAfterMs?): ZaunError

Defined in: sdk/js/src/errors.ts:14

string

string

number

ZaunError

Error.constructor

readonly code: string

Defined in: sdk/js/src/errors.ts:8

The protocol error code, or a runtime code such as NOT_GRANTED.


readonly detail: string

Defined in: sdk/js/src/errors.ts:10

The reason or field the host gave.


readonly retryAfterMs: number

Defined in: sdk/js/src/errors.ts:12

For RATE_LIMITED and BUSY: when to try again, in ms.

isUnsupported(): boolean

Defined in: sdk/js/src/errors.ts:27

Whether the host does not implement this call (or this case of it) yet: an older host, or a feature it lacks, such as volume without an Opus encoder. Fall back to what the bot did before; trying again will not help.

boolean


static from(e): ZaunError

Defined in: sdk/js/src/errors.ts:32

From the WIT host-error.

HostError

ZaunError