{"version":3,"file":"fastify.mjs","names":[],"sources":["../../src/integrations/fastify.ts"],"sourcesContent":["import { recordException } from '../instrumentations/exceptions/index.ts';\n\ntype FastifyLike = {\n  addHook: (\n    hook: 'onError',\n    handler: (\n      request: unknown,\n      reply: unknown,\n      error: Error,\n      done: (error?: Error) => void,\n    ) => void,\n  ) => void;\n};\n\nexport function setupFastifyErrorHandler(app: FastifyLike) {\n  app.addHook('onError', (_request, _reply, error, done) => {\n    void recordException(error).finally(() => done());\n  });\n}\n"],"mappings":";;AAcA,SAAgB,yBAAyB,KAAkB;CACzD,IAAI,QAAQ,YAAY,UAAU,QAAQ,OAAO,SAAS;EACxD,gBAAqB,KAAK,CAAC,CAAC,cAAc,KAAK,CAAC;CAClD,CAAC;AACH"}