Takaro - v0.6.0
    Preparing search index...

    Function setupHapiErrorHandler

    • Add a Hapi plugin to capture errors to Sentry.

      Parameters

      • server: Server

        The Hapi server to attach the error handler to

      Returns Promise<void>

      const Sentry = require('@sentry/node');
      const Hapi = require('@hapi/hapi');

      const init = async () => {
      const server = Hapi.server();

      // all your routes here

      await Sentry.setupHapiErrorHandler(server);

      await server.start();
      };