-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
a1fa5a4
commit 4a2d1b0
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters