Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

[Tech debt] Convert HTTP Status Codes to Starlette constant values #413

Closed
TheAndrewJackson opened this issue Apr 25, 2022 · 0 comments · Fixed by #438
Closed

[Tech debt] Convert HTTP Status Codes to Starlette constant values #413

TheAndrewJackson opened this issue Apr 25, 2022 · 0 comments · Fixed by #438

Comments

@TheAndrewJackson
Copy link
Contributor

Is your feature request related to a specific problem?

Currently the codebase uses a mix of magic numbers and Starlette constant values

Describe the solution you'd like

Switch all of the HTTP status codes to use the Starlette constants. This would help the code become more self documenting since a description each status is embedded within its name. It would come in handy when more niche statuses are used in the future like HTTP_413_REQUEST_ENTITY_TOO_LARGE.

This change will also follow the project standard of using constant values for magic strings that could be changed later like in the scope registry and urn registry files.

Describe alternatives you've considered, if any

We could hand roll our own constants if that's preferable or create a fidesops wrapper file the reimports all the Starlette constants. This would decouple us from Starlette and would reduce the refactoring required if we moved away from Starlette.

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

Successfully merging a pull request may close this issue.

1 participant