mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57: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,12 +125,14 @@ export class TaskRunnerServer {
|
||||||
const { app } = this;
|
const { app } = this;
|
||||||
|
|
||||||
// Augment errors sent to Sentry
|
// Augment errors sent to Sentry
|
||||||
|
if (this.globalConfig.sentry.backendDsn) {
|
||||||
const {
|
const {
|
||||||
Handlers: { requestHandler, errorHandler },
|
Handlers: { requestHandler, errorHandler },
|
||||||
} = await import('@sentry/node');
|
} = await import('@sentry/node');
|
||||||
app.use(requestHandler());
|
app.use(requestHandler());
|
||||||
app.use(errorHandler());
|
app.use(errorHandler());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private setupCommonMiddlewares() {
|
private setupCommonMiddlewares() {
|
||||||
// Compress the response data
|
// Compress the response data
|
||||||
|
|
Loading…
Reference in a new issue