ErrorHandlingAPI interface

An interface representing error handling related APIs

Methods

handleInvalidRoute(HandleInvalidRouteConfig)

Handles invalid URL paths

handleRequestFailure(FailureResponse)

Recognizes specific kinds of failure responses and takes corresponding actions from the host side.

Failures will be handled by this API:

  • MFA triggered from server side

Note that during handling, it may navigate away from current browser window or trigger page refresh.

openErrorDialog(OpenErrorConfig)

Opens an error dialog

Method Details

handleInvalidRoute(HandleInvalidRouteConfig)

Handles invalid URL paths

function handleInvalidRoute(config?: HandleInvalidRouteConfig)

Parameters

handleRequestFailure(FailureResponse)

Recognizes specific kinds of failure responses and takes corresponding actions from the host side.

Failures will be handled by this API:

  • MFA triggered from server side

Note that during handling, it may navigate away from current browser window or trigger page refresh.

function handleRequestFailure(response: FailureResponse): Promise<HandleRequestFailureResult>

Parameters

response
FailureResponse

Returns

A promise which resolves when the host finishes handling the failure

openErrorDialog(OpenErrorConfig)

Opens an error dialog

function openErrorDialog(config: OpenErrorConfig): Promise<OpenUIResult>

Parameters

config
OpenErrorConfig

The configuration of the error dialog, including title, message, stack trace, etc.

Returns

Promise<OpenUIResult>

A promise which resolves when the dialog is opened