-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: feature creation limit crud together with frontend #4221
Conversation
sjaanus
commented
Jul 12, 2023
•
edited
edited
- Add saving and reading limit to backend with migration
- Remove old project settings methods
- UI to disable creation on frontend
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/error/from-legacy-error.ts
Outdated
@@ -21,14 +21,14 @@ const getStatusCode = (errorName: string): number => { | |||
return 400; | |||
case 'MinimumOneEnvironmentError': | |||
return 400; | |||
case 'InvalidOperationError': | |||
return 400; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InvalidOperation should not be related to authorization, so not 403, but rather 400
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it for features behind a feature flag. We had a discussion about it and agreed on 403. Since it's forbidden behind a feature flag. I wouldn't change this one.
@@ -486,24 +505,6 @@ class ProjectStore implements IProjectStore { | |||
return Number(members.count); | |||
} | |||
|
|||
async getProjectSettings(projectId: string): Promise<IProjectSettings> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaning up leftover code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a very good PR. I'd not change the HTTP status code