From 42512241824dba96c858ab42f5e0f0846f3066ad Mon Sep 17 00:00:00 2001 From: fenos Date: Wed, 8 Nov 2023 13:26:49 +0000 Subject: [PATCH] fix: set error handler on admin api --- src/admin-app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/admin-app.ts b/src/admin-app.ts index b1be2d76..3cdd080a 100644 --- a/src/admin-app.ts +++ b/src/admin-app.ts @@ -1,5 +1,5 @@ import fastify, { FastifyInstance, FastifyServerOptions } from 'fastify' -import { routes, plugins } from './http' +import {routes, plugins, setErrorHandler} from './http' import { Registry } from 'prom-client' const build = (opts: FastifyServerOptions = {}, appInstance?: FastifyInstance): FastifyInstance => { @@ -37,6 +37,8 @@ const build = (opts: FastifyServerOptions = {}, appInstance?: FastifyInstance): app.get('/status', async (_, response) => response.status(200).send()) + setErrorHandler(app) + return app }