1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/error/archivedfeature-error.ts
andreas-unleash 4a2d1b0364
fix: return 400 when enabling env of archived toggle (#6049)
Creates a new ArchivedFeatureError.
Throw this error when trying to toggle a feature environment for an
archived feature.

Closes
https://github.com/orgs/Unleash/projects/8/views/1?pane=issue&itemId=51242922

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-26 16:02:17 +02:00

14 lines
335 B
TypeScript

import { UnleashError } from './unleash-error';
class ArchivedFeatureError extends UnleashError {
statusCode = 400;
constructor(
message: string = 'Cannot perform this operation on archived features',
) {
super(message);
}
}
export default ArchivedFeatureError;
module.exports = ArchivedFeatureError;