[]previous and next page

DuskError

Error with a stable diagnostic code, for conditions the caller can fix.

Error with a stable diagnostic code, for conditions the caller can fix.

Import#

ts
import { DuskError } from "@shadow-js/dusk/server";

Signature#

ts
class DuskError extends Error

Members#

Name Type Description
code readonly code: string

Examples#

ts
try { getRequestEvent(); } catch (error) { if (error instanceof DuskError) console.log(error.code); }