[]previous and next page

EnvError

Thrown at startup when the environment does not match its schema.

Thrown at startup when the environment does not match its schema. The message names the variables and the problem, never the values, so it is safe to log.

Import#

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

Signature#

ts
class EnvError extends Error

Members#

Name Type Description
issues readonly issues: readonly EnvIssue[]

Examples#

ts
try { env.parse({}); } catch (error) { if (error instanceof EnvError) console.log(error.issues); }