After getting a similar issue and wasting hours on it I figured out how to debug this situation.
For some reason the @transaction.commit_manually decorator silences exceptions that occur in the function.
Temporarily remove the decorator from your function, you’ll now see the exception, fix it and put the decorator back!