You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that if a transaction was aborted due to any database issue, then the @Transaction function would lose its current transaction context and cannot properly proceed. The error will always be:
INSERT INTO dbos.transaction_outputs (workflow_uuid, function_id, output, txn_id, txn_snapshot, created_at) VALUES ($1, $2, $3, (select pg_current_xact_id_if_assigned()::text), $4, $5) RETURNING txn_id; - current transaction is aborted, commands ignored until end of transaction block
Issues reported from our user:
Be able to handle exceptions in the @transaction - not possible right now
The error is logged even when it's handled. That is also not desirable
A @transaction that is also a @GETAPI will fail even if the error is handled
Potential solution: when a transaction is aborted but there is some subsequent code to handle it, restart a new transaction for it.
The text was updated successfully, but these errors were encountered:
As we discussed in the team, we think the best solution is to provide a better error message: #640
If a transaction is aborted, then the function must throw an error. Error handling can be done outside of transactions. The reason is that for an aborted transaction, the current transaction connection to the database is aborted and cannot run any further commands. So there's no point to handle the error and continue with processing.
The issue is that if a transaction was aborted due to any database issue, then the
@Transaction
function would lose its current transaction context and cannot properly proceed. The error will always be:Issues reported from our user:
Potential solution: when a transaction is aborted but there is some subsequent code to handle it, restart a new transaction for it.
The text was updated successfully, but these errors were encountered: