mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
12 lines
388 B
TypeScript
12 lines
388 B
TypeScript
|
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,
|
||
|
});
|
||
|
}
|
||
|
}
|