mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor: Delete a lot of unused and duplicate code in Server and WebhookServer (#5080)
* store n8n version string in a const and use that everywhere * reduce code duplication between Server and WebhookServer * unify redis checks * fix linting
This commit is contained in:
committed by
GitHub
parent
b67f803cbe
commit
8b19fdd5f0
@@ -1,4 +1,3 @@
|
||||
import type { Application } from 'express';
|
||||
import config from '@/config';
|
||||
import { ErrorReporterProxy } from 'n8n-workflow';
|
||||
|
||||
@@ -44,11 +43,3 @@ export const initErrorHandling = async () => {
|
||||
|
||||
initialized = true;
|
||||
};
|
||||
|
||||
export const setupErrorMiddleware = async (app: Application) => {
|
||||
const {
|
||||
Handlers: { requestHandler, errorHandler },
|
||||
} = await import('@sentry/node');
|
||||
app.use(requestHandler());
|
||||
app.use(errorHandler());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user