From b5da509ceeb80506fd3c6b9d5cab0eb9a1f02950 Mon Sep 17 00:00:00 2001 From: Micah Wylde Date: Wed, 18 Dec 2024 13:47:13 -0800 Subject: [PATCH] Fix panic in API when connetionProfileId is not specified but is required --- crates/arroyo-api/src/connection_tables.rs | 3 +++ webui/index.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/arroyo-api/src/connection_tables.rs b/crates/arroyo-api/src/connection_tables.rs index df110b893..82f705886 100644 --- a/crates/arroyo-api/src/connection_tables.rs +++ b/crates/arroyo-api/src/connection_tables.rs @@ -91,6 +91,9 @@ async fn get_and_validate_connector( connection_profile.config.clone(), ) } else { + if connector.metadata().connection_config.is_some() { + return Err(bad_request("this connector requires a connection profile, but `connectionProfileId` was not specified")); + } (None, json! {{}}) }; diff --git a/webui/index.html b/webui/index.html index 5af6cdf4e..7fc55245b 100644 --- a/webui/index.html +++ b/webui/index.html @@ -8,8 +8,8 @@ Arroyo Console