• Version 1.5.3
  • Published
  • 4.83 kB
  • 1 dependency
  • MIT license


npm i @types/errorhandler
yarn add @types/errorhandler
pnpm add @types/errorhandler


TypeScript definitions for errorhandler



variable title

const title: string;
  • Template title, framework authors may override this value.


function errorHandler

errorHandler: typeof errorHandler;
  • Create new middleware to handle errors and respond with content negotiation.


interface LoggingCallback

interface LoggingCallback {}

    call signature

    (err: Error, str: string, req: express.Request, res: express.Response): void;

      interface Options

      interface Options {}

        property log

        log: boolean | LoggingCallback;
        • Provide a function to be called with the error and a string representation of the erro Defaults to true.

          Possible values: true : Log errors using console.error(str). false : Only send the error back in the response. A function : pass the error to a function for handling.

        Package Files (1)

        Dependencies (1)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (0)

        No peer dependencies.


        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/errorhandler.

        • Markdown
        • HTML
          <a href="https://www.jsdocs.io/package/@types/errorhandler"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>