Fueled / django-init

Project template used at Fueled for scaffolding new Django based projects. :dizzy:
Other
189 stars 46 forks source link

Type Error in parse_field_errors in exceptions.py #448

Open robd003 opened 2 years ago

robd003 commented 2 years ago

Getting a weird issue with Django DB exceptions that aren't parsed correctly by the custom exception handler.

TypeError: string indices must be integers

This is on line 94 here: https://github.com/Fueled/django-init/blob/main/%7B%7Bcookiecutter.github_repository%7D%7D/%7B%7Bcookiecutter.main_module%7D%7D/base/exceptions.py#L94

Actual DB exception is IntegrityError duplicate key value violates unique constraint "unique_shortname" DETAIL: Key (domain_id, short_name)=(test.com, key_already_in_use) already exists.

CuriousLearner commented 2 years ago

Hi @robd003

Do you have a minimal project where this exception occurred? It would be easier for someone to debug it that way.