@darthcav/ts-http-server
    Preparing search index...

    Function defaultErrorHandler

    • Fastify error handler supporting Boom errors and generic errors.

      Negotiates the response format via @fastify/accepts:

      • text/html — renders _error.ejs (requires @fastify/view).
      • application/json — JSON payload.
      • Otherwise — plain-text.

      For Boom errors the HTTP status code and payload come from error.output. For generic errors a 500 is used unless the reply already has a 4xx/5xx status.

      Parameters

      • error: FastifyError
      • request: FastifyRequest
      • reply: FastifyReply

      Returns Promise<void>