From f35eb5dc7be612dd3e204ebcee4f0d76da42ed84 Mon Sep 17 00:00:00 2001 From: Martin Turoci Date: Mon, 9 Oct 2023 12:44:48 +0200 Subject: [PATCH] feat: Add custom error for when Wave app cannot connect to Wave server. --- py/h2o_wave/h2o_wave/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/h2o_wave/h2o_wave/server.py b/py/h2o_wave/h2o_wave/server.py index 86cef17339..c00530672e 100644 --- a/py/h2o_wave/h2o_wave/server.py +++ b/py/h2o_wave/h2o_wave/server.py @@ -286,7 +286,7 @@ async def _register(self): elapsed_time = current_time - start_time if elapsed_time.seconds > connection_timeout: logger.debug(f'Register: giving up after retrying for {connection_timeout} seconds') - raise exception + raise ConnectionError('Could not connect to Wave server. Make sure it is running.') from exception await asyncio.sleep(1) logger.debug('Register: retrying...')