mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
fix: Load sentry for task runner server only if configured (no-changelog) (#11420)
This commit is contained in:
parent
7699240073
commit
d6aaeea2ab
|
@ -125,11 +125,13 @@ export class TaskRunnerServer {
|
|||
const { app } = this;
|
||||
|
||||
// Augment errors sent to Sentry
|
||||
const {
|
||||
Handlers: { requestHandler, errorHandler },
|
||||
} = await import('@sentry/node');
|
||||
app.use(requestHandler());
|
||||
app.use(errorHandler());
|
||||
if (this.globalConfig.sentry.backendDsn) {
|
||||
const {
|
||||
Handlers: { requestHandler, errorHandler },
|
||||
} = await import('@sentry/node');
|
||||
app.use(requestHandler());
|
||||
app.use(errorHandler());
|
||||
}
|
||||
}
|
||||
|
||||
private setupCommonMiddlewares() {
|
||||
|
|
Loading…
Reference in a new issue