Skip to content

Commit 86c7bd7

Browse files
committed
(jupyterhub) improve error message on exceeded quota
1 parent fde6089 commit 86c7bd7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • applications/jupyterhub/src/harness_jupyter/harness_jupyter

applications/jupyterhub/src/harness_jupyter/harness_jupyter/jupyterhub.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import urllib.parse
33
import asyncio
44
from functools import partial
5-
5+
from tornado import web
66
from kubespawner.spawner import KubeSpawner
77
from jupyterhub.utils import exponential_backoff
88

@@ -29,8 +29,9 @@ def custom_options_form(spawner, abc):
2929
return spawner._options_form_default()
3030

3131

32-
class PodSpawnException(Exception):
33-
pass
32+
class PodSpawnException(web.HTTPError):
33+
def __init__(self, message, status_code=403):
34+
super().__init__(status_code=status_code, log_message=message)
3435

3536

3637
def harness_hub():

0 commit comments

Comments
 (0)