[Answered ]-Django – grabbing error message from MySQL trigger via handling OperationalError

2👍

You haven’t imported OperationalError before using it in your code:

from django.db import OperationalError

You might actually want to catch DatabaseError instead of OperationalError (which is a subclass of DatabaseError).

Leave a comment