1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/error/exceeds-limit-error.ts

12 lines
388 B
TypeScript
Raw Normal View History

import { GenericUnleashError } from './unleash-error';
export class ExceedsLimitError extends GenericUnleashError {
constructor(resource: string, limit: number) {
super({
name: 'ExceedsLimitError',
message: `Failed to create ${resource}. You can't create more than the established limit of ${limit}.`,
statusCode: 400,
});
}
}