effect-io-ai

Package: effect
Module: Brand

Brand.BrandError

Error returned when a branded type is constructed from an invalid value.

Details

The error wraps a SchemaIssue.Issue, exposes message through issue.toString(), and formats as BrandError(<message>).

Gotchas

BrandError is an error-like model with _tag, name, message, and toString; it does not extend JavaScript Error.

Signature

declare class BrandError { constructor(issue: SchemaIssue.Issue) }

Source

Since v4.0.0