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(
308
308
# otherwise it may cause a redirect loop
309
309
if f .done () and f .exception ():
310
310
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
311
315
raise web .HTTPError (
312
316
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 } " ,
315
318
)
316
319
return self .redirect (pending_url )
317
320
Original file line number Diff line number Diff line change @@ -1129,7 +1129,7 @@ async def test_health_check_request(app):
1129
1129
1130
1130
1131
1131
async def test_pre_spawn_start_exc_no_form (app ):
1132
- exc = "pre_spawn_start error"
1132
+ exc = "Unhandled error starting server "
1133
1133
1134
1134
# throw exception from pre_spawn_start
1135
1135
async def mock_pre_spawn_start (user , spawner ):
You can’t perform that action at this time.
0 commit comments