Skip to content

Commit

Permalink
fix: entitlement error should explain which entitlement
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Feb 20, 2023
1 parent edf268b commit c753b37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/errors/unsupported-entitlement-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export class UnsupportedEntitlementError extends CustomError {
entitlement: string,
userMessage = `This feature is currently not enabled for your org. To enable it, please contact snyk support.`,
) {
super('Unsupported feature - Missing the ${entitlementName} entitlement');
super(
`Unsupported feature - Missing the ${
entitlement ? entitlement : 'required'
} entitlement`,
);
this.entitlement = entitlement;
this.code = UnsupportedEntitlementError.ERROR_CODE;
this.userMessage = userMessage;
Expand Down

0 comments on commit c753b37

Please sign in to comment.