Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Latest commit

 

History

History
14 lines (11 loc) · 409 Bytes

File metadata and controls

14 lines (11 loc) · 409 Bytes

Sentry

import { createServer } from 'unicore';

const server = createServer({ sentry: { dsn: 'sentrydsn' } });
server.use(server.sentry.requestHandler());
// ...Your handlers and middlewares
// ...
// And as a first error middleware:
server.use(server.sentry.errorHandler());

Only connects to sentry if sentry option is available. server.sentry is always available and interface is the same.