Skip to content

Commit

Permalink
fix: set error handler on admin api
Browse files Browse the repository at this point in the history
  • Loading branch information
fenos committed Nov 8, 2023
1 parent 125082f commit 4251224
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/admin-app.ts
Original file line number Diff line number Diff line change
@@ -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 => {
Expand Down Expand Up @@ -37,6 +37,8 @@ const build = (opts: FastifyServerOptions = {}, appInstance?: FastifyInstance):

app.get('/status', async (_, response) => response.status(200).send())

setErrorHandler(app)

return app
}

Expand Down

0 comments on commit 4251224

Please sign in to comment.