Open
Description
Expected Behavior
Everytime a MARCXML from legacy is not successfully converted and stored on Labs the content should be stored into inspire_prod_records
.
Current Behavior
If there is DB error in the middle, the transaction is not in a clean state, and therefore also storing the failed input in inspire_prod_records
is currently failing.
Steps to Reproduce (for bugs)
See: https://sentry.cern.ch/inspire-sentry/inspire-labs/group/822737/
Possible solution
In case of SQL error, we should obtain a clean new session before storing the failed marcxml.