refactor(core): Reorganize error hierarchy in cli package (no-changelog) (#7839)
Ensure all errors in `cli` inherit from `ApplicationError` to continue normalizing all the errors we report to Sentry Follow-up to: https://github.com/n8n-io/n8n/pull/7820
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
import { NotStringArrayError } from '@/errors/not-string-array.error';
|
||||
import type { SchemaObj } from 'convict';
|
||||
|
||||
class NotStringArrayError extends Error {
|
||||
constructor(env: string) {
|
||||
super(`${env} is not a string array.`);
|
||||
}
|
||||
}
|
||||
|
||||
export const ensureStringArray = (values: string[], { env }: SchemaObj<string>) => {
|
||||
if (!env) throw new Error(`Missing env: ${env}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user