In the Async API, TransactionContext.executeUpdateAsync() correctly propagates errors through ApiFuture callbacks. However, in an asynchronous transaction, the .then() operator does not get the same exceptions propagated to it from the transaction function.
Code example
The following test (just add a custom databaseId) hangs because neither the success nor failure callback is called, and the latch is never released. If the SQL statement were corrected, the test would pass, as success is propagated correctly.
* fix: AsyncTransactionManager did not propagate statement errors
Invalid statements or other statements that would cause an error would not cause the
returned ApiFuture to fail.
Fixes#514
* test: use existing invalid statement in test
Environment details
Steps to reproduce
In the Async API,
TransactionContext.executeUpdateAsync()
correctly propagates errors throughApiFuture
callbacks. However, in an asynchronous transaction, the.then()
operator does not get the same exceptions propagated to it from the transaction function.Code example
The following test (just add a custom
databaseId
) hangs because neither the success nor failure callback is called, and the latch is never released. If the SQL statement were corrected, the test would pass, as success is propagated correctly.Thanks!
The text was updated successfully, but these errors were encountered: