Files
Automata/packages/cli/src/errors/feature-not-licensed.error.ts
Iván Ovejero 1c6178759c 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
2023-11-28 10:19:27 +01:00

11 lines
396 B
TypeScript

import type { LICENSE_FEATURES } from '@/constants';
import { ApplicationError } from 'n8n-workflow';
export class FeatureNotLicensedError extends ApplicationError {
constructor(feature: (typeof LICENSE_FEATURES)[keyof typeof LICENSE_FEATURES]) {
super(
`Your license does not allow for ${feature}. To enable ${feature}, please upgrade to a license that supports this feature.`,
);
}
}