PostHog / PostHog/drf-exceptions-hog
Force Multiple Exceptions Format
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 67
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
It would be useful to have only one error response format regardless of the number of errors as documenting and consuming both is a bit tedious.
So instead of:
if api_settings.SUPPORT_MULTIPLE_EXCEPTIONS and len(exception_list) > 1:
create multiple format
Maybe something like?
if api_settings.FORCE_MULTIPLE_EXCEPTIONS or api_settings.SUPPORT_MULTIPLE_EXCEPTIONS and len(exception_list) > 1
create multiple format
I can make a PR if you're interested.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating SUPPORT_MULTIPLE_EXCEPTIONS and the exception-response formatting logic in the repository. Trace how exception_list length selects the response shape, then check the existing tests around error responses. Done means the new setting consistently produces the multiple-exception format regardless of the number of errors, without changing the current default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100