File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -308,10 +308,13 @@ async def _wrap_spawn_single_user(
308308 # otherwise it may cause a redirect loop
309309 if f .done () and f .exception ():
310310 exc = f .exception ()
311+ self .log .exception (f"Error starting server { spawner ._log_name } : { exc } " )
312+ if isinstance (exc , web .HTTPError ):
313+ # allow custom HTTPErrors to pass through
314+ raise exc
311315 raise web .HTTPError (
312316 500 ,
313- "Error in Authenticator.pre_spawn_start: %s %s"
314- % (type (exc ).__name__ , str (exc )),
317+ f"Unhandled error starting server { spawner ._log_name } " ,
315318 )
316319 return self .redirect (pending_url )
317320
Original file line number Diff line number Diff line change @@ -1129,7 +1129,7 @@ async def test_health_check_request(app):
11291129
11301130
11311131async def test_pre_spawn_start_exc_no_form (app ):
1132- exc = "pre_spawn_start error"
1132+ exc = "Unhandled error starting server "
11331133
11341134 # throw exception from pre_spawn_start
11351135 async def mock_pre_spawn_start (user , spawner ):
You can’t perform that action at this time.
0 commit comments