Skip to content
GitHub

UserErrorOptions

interface in meocord/common Since 4.1.0

interface UserErrorOptions

What a UserError carries besides its message.

Members

code

code?: string

Names the error, for a filter or presenter to branch on, or to look a translation up by.

context

context?: Readonly<Record<string, unknown>>

Values the message is built from, such as the amount missing, for a translation to fill in.

cause

cause?: unknown

The error that led to this one, such as a lookup that failed.