mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Migrate all errors in cli package to new hierarchy (#13478)
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { Container, Service } from '@n8n/di';
|
||||
import { Router } from 'express';
|
||||
import type { Application, Request, Response, RequestHandler } from 'express';
|
||||
import { rateLimit as expressRateLimit } from 'express-rate-limit';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { UnexpectedError } from 'n8n-workflow';
|
||||
import type { ZodClass } from 'zod-class';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
@@ -100,7 +100,7 @@ export class ControllerRegistry {
|
||||
return res.status(400).json(output.error.errors[0]);
|
||||
}
|
||||
}
|
||||
} else throw new ApplicationError('Unknown arg type: ' + arg.type);
|
||||
} else throw new UnexpectedError('Unknown arg type: ' + arg.type);
|
||||
}
|
||||
return await controller[handlerName](...args);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user