Options
All
  • Public
  • Public/Protected
  • All
Menu

Error handler store. This store keeps the registered error handlers. Go through the Mesh API to register an error handler.

Hierarchy

  • ErrorHandlerStore

Index

Methods

registerErrorHandler

  • Register an error handler for an error status. There can only be one handler per status.

    Parameters

    • status: number

      The status the handler should be registered for.

    • handler: IMeshErrorHandler

      The handler that should be registered.

    Returns void

unregisterErrorHandler

  • Unregister an error handler for a status.

    Parameters

    • status: number

      The status the handler should be unregistered from.

    • Optional handler: IMeshErrorHandler

      The handler that should be unregistered.

    Returns void

workErrorHandler

  • Execute the error handler for a status.

    Parameters

    • status: number

      The status for which the handler should be executed.

    • error: any

      An object describing the error.

    • req: IMeshRequest

      The MeshRequest.

    • res: IMeshResponse

      The MeshResponse

    Returns Promise<void>

    A promise, that will be fulfilled once the error handler has been executed and will be rejected if executing the error handler fails.

Generated using TypeDoc