-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add HTTP Status Codes ENUM #1439
Comments
Personally I'm against adding this as a dependency or adding this built-in. I could imagine adding this to the docs somewhere though. |
@dummdidumm what are the reasons, why you are against it. I could think of the additional footprint on client. |
I'd be against this for two reasons:
So there's no need to add this into Svelte-Kit core. The people who want this, and are willing to pay the cost of an extra 3.5 kB sent to the client, can use the |
I'm going to close this for the reasons given in the above comment |
Is your feature request related to a problem? Please describe.
When giving proper error codes in response of endpoints/loads sometimes I have to google for the correct code, like PAYMENT_REQUIRED, BAD_REQUEST and some other things. Most Codes are well known, others not. To make it easier implementing a ENUM is a good solution.
Describe the solution you'd like
I'd like to get the Status Code ENUMs integrated in svelte kit.
Describe alternatives you've considered
I started using https://www.npmjs.com/package/http-status-codes package.
A decision has to be made.
1)
I can create a PR and add it to svelte kit.
2)
A already written npm package could be put into the package.json.
3)
Leave it to the user like current state.
The text was updated successfully, but these errors were encountered: