jupyter-server / enterprise_gateway

A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
https://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Other
619 stars 223 forks source link

Handle exceptions in the `load_session` #1385

Open weekenthralling opened 3 months ago

weekenthralling commented 3 months ago

When refreshing the kernel, there might be other exceptions causing the refresh to fail. Perhaps catching exceptions would be more elegant.

For example: When querying a non-existent kernel, the load_session method from the webhook returns a 404 error. If this is not handled, the final API response is a 500 error, whereas the expected response is a 404.