Error message when cache.set has trouble.
|Reported by:||ezimir||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.1-beta|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I am using low-level cache in my app, there were some cases when the cache.set method reported the TransactionManagementError: This code isn't under transaction management error, because (I guessed) that there is some underlying DB execution error.
I managed to find out what that original error was (with PDB) (and solve the problem):
OperationalError: (1153, "Got a packet bigger than 'max_allowed_packet' bytes")
Now, is there a way to retrieve the original error from code? Is there a way to tell Django not to try to rollback that unsuccessful query? Is it a bug (i.e. Django shouldn't try to rollback code that is not under transaction management)? Is it a version specific problem?
(1, 1, 1, 'final', 0)
Thank you for your time.