-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
♻️ Changing all status codes from raw numbers to using constants from status
#1624
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
base: master
Are you sure you want to change the base?
♻️ Changing all status codes from raw numbers to using constants from status
#1624
Conversation
…deh/full-stack-fastapi-template into refactor-status-code
This comment was marked as resolved.
This comment was marked as resolved.
Thank you, @YuriiMotov. |
status
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.
LGTM
Still not sure about ranges.
I think we should leave numbers for
assert 200 <= r.status_code < 300
But these changes are in separate commit. Can be easily reverted
@javadzarezadeh, thanks again!
I believe that using status codes via FastAPI (Starlette, actually!) instead of using raw numbers is more readable, consistent, and makes development easier.
Re-request from PR #1319.