PostHog / drf-exceptions-hog

Standardized and easy-to-parse API error responses for Django REST Framework (DRF).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Force Multiple Exceptions Format

tspanos opened this issue · comments

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.