Hey there!
Apologies if this may be a dumb question, however here is my current scenario and what I am trying to accomplish:
- I have a pre_spawn_hook in my JupyterHub config that does some bootstrapping, but also does some permissions checks based on a custom drop-down option that loads prior to spawning a server
- I created a custom not_running.html template that extends the base not_running.html template that should display a custom error message if the pre_spawn_hook permissions checks fail
My problem is I’m not quite sure how to go about raising the correct error/exception/etc. in my pre_spawn_hook to load the custom not_running.html template. I’ve tried raising things like tornado.web.HTTPError
but that would just raise the error in the logs and take me to the base not_running.html template.
Any tips/advice/help would be greatly appreciated!