I did a little bit of digging, and found out that this is known to happen under a couple of very specific circumstances. There appear to be some well known issues with PyODBC not throwing exceptions when the database transaction returns multiple results. So my initial conjecture is that there’s no exception for you to catch.
For some ideas, take a look at:
(Note: I searched for “django pyodbc sql server doesn’t throw exceptions”. That seems like a good place to start.)
These aren’t Django specific references, but identify that the issue may be lower down in the stack and are being caused outside what Django has control over. Without having more details about your specific environment (versions of code, SQL Server, statement throwing the error, etc) I can’t narrow it down any more than this.
If I were investigating this, I’d try to recreate it in the Django shell, and follow it from there.