Skip to content

Commit f580edf

Browse files
committed
fix: Fixed assertion.
1 parent d88c1ab commit f580edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function handleValidationError(error: FastifyError, request: FastifyReque
3737

3838
export function handleErrors(error: FastifyError | Error, request: FastifyRequest, reply: FastifyReply): void {
3939
if (request[kHttpErrorsEnhancedConfiguration]?.preHandler) {
40-
error = request[kHttpErrorsEnhancedConfiguration]!.preHandler!(error)
40+
error = request[kHttpErrorsEnhancedConfiguration].preHandler(error)
4141
}
4242

4343
// It is a generic error, handle it

0 commit comments

Comments
 (0)