diff --git a/docs/source/reference/spawners.md b/docs/source/reference/spawners.md index ce39b598..f91ec320 100644 --- a/docs/source/reference/spawners.md +++ b/docs/source/reference/spawners.md @@ -108,6 +108,16 @@ class MySpawner(Spawner): return url ``` +#### Exception handling + +When `Spawner.start` raises an Exception, a message can be passed on to the user via the exception via a `.jupyterhub_html_message` or `.jupyterhub_message` attribute. + +When the Exception has a `.jupyterhub_html_message` attribute, it will be rendered as HTML to the user. + +Alternatively `.jupyterhub_message` is rendered as unformatted text. + +If both attributes are not present, the Exception will be shown to the user as unformatted text. + ### Spawner.poll `Spawner.poll` should check if the spawner is still running.