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

Basic components to assist with error handling and adhere exceptions to the Api spec #983

Closed
Tracked by #889
silentninja opened this issue Jan 19, 2022 · 0 comments · Fixed by #986
Closed
Tracked by #889
Assignees
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL

Comments

@silentninja
Copy link
Contributor

silentninja commented Jan 19, 2022

Problem

We need a basic set of components to help with converting existing exceptions to new error spec.

  1. A exception handler that is able to capture all exceptions and provide the ability to extend as needed
  2. Error structure that conforms to the API spec to be used when constructing an error
  3. Error code unique Enum to refer to

Proposed solution

  1. We can override the default Drf exception handler which allows us to capture any exception that is thrown
  2. NamedTuple looks like a good candidate
  3. Enum with unique decorator
@silentninja silentninja added status: draft type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL labels Jan 19, 2022
@silentninja silentninja changed the title We need an exception handler that is able to capture all the exceptions Basic components to assist with error handling and adhere exceptions to the Api spec Jan 19, 2022
@silentninja silentninja self-assigned this Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant