[19.0[IMP] edi_core_oca: mark process integrity errors as failed - #319
[19.0[IMP] edi_core_oca: mark process integrity errors as failed#319yankinmax wants to merge 1 commit into
Conversation
simahawk
left a comment
There was a problem hiding this comment.
I agree w/ @Ricardoalso
af09c01 to
4b7cb23
Compare
4b7cb23 to
c088ac6
Compare
| res = f"Error: {error}" | ||
| except (OperationalError, IntegrityError): | ||
| except IntegrityError as err: |
There was a problem hiding this comment.
Well with this change we just end up duplicating code
if self.env.context.get("_edi_process_break_on_error"):
raise
traceback = _get_exception_traceback()
error = _get_exception_msg(err)
state = "input_processed_error"
res = f"Error: {error}"
I rechecked the code and with the changes introduced by 8f44487,
I would keep IntegrityError inside _swallable_exceptions because it always runs inside a cr.savepoint(), which rolls back to the savepoint before this is caught, leaving the cursor usable.
Leaving OperationalError handling (res = "__sql_error__") separately as it may indicate a broken connection rather than a "bad statement".
@guewen your input is welcome on this one 🙏
|
What is the status here? :) |
This is being handled by OCA/queue#955 and #324 This PR can be closed |
Thanks for the info, I'll close this one! |
No description provided.