diff --git a/examples/asynchronous_batching.py b/examples/asynchronous_batching.py index 722ca233..d5ce476f 100644 --- a/examples/asynchronous_batching.py +++ b/examples/asynchronous_batching.py @@ -56,7 +56,7 @@ async def async_write(batch): Write batches by subscribing to Rx generator """ batches.subscribe(on_next=lambda batch: print(f'Written batch... {len(batch)}'), - on_error=lambda ex: print(f'Unexpected error: {ex}'), + on_error=lambda ex: done.set_exception(ex), on_completed=lambda: done.set_result(0), scheduler=AsyncIOScheduler(asyncio.get_event_loop())) """