Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

use http status codes #138

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Conversation

casperdcl
Copy link
Contributor

@casperdcl casperdcl self-assigned this Sep 4, 2023
@casperdcl casperdcl added enhancement New feature or request python Pull requests that update Python code p2-nice-to-have Low priority labels Sep 4, 2023
@casperdcl casperdcl mentioned this pull request Sep 4, 2023
@@ -58,7 +59,7 @@ async def registries_all():
"/registries/",
response_model=schemas.RegistryResponse,
responses={
400: {
HTTPStatus.BAD_REQUEST: {
Copy link
Contributor Author

@casperdcl casperdcl Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi since statuses are IntEnum, this change should be fine (no need to use HTTPStatus.BAD_REQUEST.value i.e. int explicitly)

>>> BAD_REQUEST == 400 == BAD_REQUEST.value
True

Copy link
Contributor

@Janaka-Steph Janaka-Steph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@nsosio nsosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me :)

@casperdcl casperdcl merged commit 373beda into premAI-io:main Sep 4, 2023
1 check passed
@casperdcl casperdcl deleted the http-status_code branch September 4, 2023 18:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request p2-nice-to-have Low priority python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use http status codes
3 participants