On This Page

ApplicationError

Class in Errors · JavaScript & TypeScript

An application callback invoked by the SDK failed, threw or rejected

The runBot function returns it as an expected failure, with source "runBot setup", when its setup callback fails, and with source "runBot commands" when its commands register callback throws. Where the SDK cannot return a typed failure, such as a default keepTyping task, it appears as a fault inside SdkDefect. The original failure or thrown value is the cause. Handler, filter and collector callback failures are reported with their original value through FailureReport or their own error types instead

class ApplicationError extends FluxerlyErrorclass ApplicationError
  extends FluxerlyError

Constructor#

new ApplicationError(
    source: string,
    cause: unknown
): ApplicationErrornew ApplicationError(
  source: string,
  cause: unknown
): ApplicationError

Parameters

source

Names the application callback that failed, such as runBot setup or keepTyping task

string
cause

The original thrown or rejected value

unknown

Properties#

_tag#

Discriminator for a failure thrown by application code rather than the SDK

readonly _tag: "ApplicationError"

source#

Names the application callback that failed, such as runBot setup or keepTyping task

readonly source: string

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON