UNPKG

@athenna/http

Version:

The Athenna Http server. Built on top of fastify.

29 lines (28 loc) 826 B
/** * @athenna/http * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import { ExceptionHandler } from '@athenna/common'; import type { ErrorContext } from '#src/types'; export declare class HttpExceptionHandler extends ExceptionHandler { /** * Error codes that should be ignored from logging. */ get ignoreCodes(): string[]; /** * Error statuses that should be ignored from logging. */ get ignoreStatuses(): number[]; /** * The exception handler of all request handlers. */ handle({ error, response }: ErrorContext): Promise<void>; /** * Return a boolean indicating if the error can be logged or not. */ private canBeLogged; }