mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-31 13:05:42 +02:00
15 lines
485 B
TypeScript
15 lines
485 B
TypeScript
import type { LICENSE_FEATURES } from '@n8n/constants';
|
|
import { UserError } from 'n8n-workflow';
|
|
|
|
export class FeatureNotLicensedError extends UserError {
|
|
constructor(
|
|
feature: (typeof LICENSE_FEATURES)[keyof typeof LICENSE_FEATURES],
|
|
opts: { extra?: Record<string, unknown> } = {},
|
|
) {
|
|
super(
|
|
`Your license does not allow for ${feature}. To enable ${feature}, please upgrade to a license that supports this feature.`,
|
|
{ level: 'warning', extra: opts.extra },
|
|
);
|
|
}
|
|
}
|