Skip to content
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

Get constant name by status code #101

Open
j3bb9z opened this issue Jan 17, 2024 · 2 comments
Open

Get constant name by status code #101

j3bb9z opened this issue Jan 17, 2024 · 2 comments

Comments

@j3bb9z
Copy link

j3bb9z commented Jan 17, 2024

Hi,

It would be useful to get constant name by status code:

getConstantNameByStatusCode(500) // 'INTERNAL_SERVER_ERROR'
@codenomnom
Copy link

That would be highly appreciated!

@markusberg
Copy link

This already exists:

const status = StatusCodes[500] // 'INTERNAL_SERVER_ERROR'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants