From 8c988dcb2d8a6cd1a7cff8986c0b59379899ac03 Mon Sep 17 00:00:00 2001 From: Zachary Sailer Date: Mon, 4 Nov 2024 14:35:36 -0800 Subject: [PATCH] Update jupyter_server/services/events/handlers.py --- jupyter_server/services/events/handlers.py | 3 +++ 1 file changed, 3 insertions(+) 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: