We should check if the transaction_id already exists tor a tenant. Currently when a transaction_id is used twice while initialising a transaction status code 500 is returned because when trying to store the transaction an error is returned from the DB:
failed to store transaction: failed to close prepared statement: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02): ERROR: duplicate key value violates unique constraint \"transactions_identifier_tenant_id_idx\" (SQLSTATE 23505)
We should return status code 409 - Conflict when the transaction_id already exists.
We should check if the
transaction_id
already exists tor a tenant. Currently when atransaction_id
is used twice while initialising a transaction status code500
is returned because when trying to store the transaction an error is returned from the DB:We should return status code
409 - Conflict
when thetransaction_id
already exists.