Opened 3 years ago

Closed 3 years ago

#33541 closed Uncategorized (invalid)

Database exceptions / django.db.utils.Error and subclasses are not documented

Reported by: juspence Owned by: nobody
Component: Documentation Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am trying to implement a similar feature as https://code.djangoproject.com/ticket/24810 for my app, which uses Django. The details aren't really important, but my goal is to add custom retry logic depending on what exception is received and what the cause was. So I need to know what the different django.db.utils.Error subtypes mean and what situations they get raised in.

I have looked at the docs:
https://docs.djangoproject.com/en/4.0/ref/exceptions/#database-exceptions

And the source code:
https://github.com/django/django/blob/main/django/db/utils.py

But there is nothing written about what the different database exceptions mean.

Change History (1)

comment:1 by Mariusz Felisiak, 3 years ago

Component: UncategorizedDocumentation
Resolution: invalid
Status: newclosed

It's documented that "Django wrappers for database exceptions behave exactly the same as the underlying database exceptions. See PEP 249, the Python Database API Specification v2.0, for further information." There is no need to copy descriptions from PEP 249 into Django docs.

Note: See TracTickets for help on using tickets.
Back to Top