diff --git a/jupyter_server/services/events/handlers.py b/jupyter_server/services/events/handlers.py index de0e70fad..ba30da1fb 100644 --- a/jupyter_server/services/events/handlers.py +++ b/jupyter_server/services/events/handlers.py @@ -82,6 +82,9 @@ def validate_model( message = f"Missing `{key}` in the JSON request body." raise Exception(message) schema_id = cast(str, data.get("schema_id")) + # The case where a given schema_id isn't found, + # jupyter_events raises a useful error, so there's no need to + # handle that case here. schema = registry.get(schema_id) version = int(cast(int, data.get("version"))) if schema.version != version: