Catch exceptions correctly in async RPC calls.