Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GlobalErrorHandler

Handles erroneous HTTP status codes at a global level (i.e. not associated with a floofball). Used when an error is thrown outside the context of a floofball.

Hierarchy

Index

Methods

exec

  • exec(func: function): void
  • Sets an executor on this handler for the specified HTTP status codes or code ranges. If no specific codes or code ranges are specified, this handler will handle all status codes.

    Parameters

    • func: function

      The executor function, which accepts the incoming request, the status message, and the FloofRenderer.

    Returns void

forCode

  • Sets specific HTTP status codes to run this handler for.

    Parameters

    • Rest ...code: number[]

      The HTTP status codes to handle.

    Returns ErrorHandler

    This ErrorHandler, for the sake of chaining.

forCodes

  • forCodes(startIncl: number, endExcl: number): ErrorHandler
  • Sets a range of HTTP status codes to run this handler for.

    Parameters

    • startIncl: number

      The beginning of the range, inclusive.

    • endExcl: number

      The end of the range, exclusive.

    Returns ErrorHandler

    This ErrorHandler, for the sake of chaining.

Generated using TypeDoc