This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new bd2c948498a Fix ConnectionForm crashing when connection has invalid
extra JSON (#66593)
bd2c948498a is described below
commit bd2c948498aa403c18468f86e2a8912addd2dbbb
Author: Shashwati Bhattacharyaa <[email protected]>
AuthorDate: Wed May 13 01:39:31 2026 +0530
Fix ConnectionForm crashing when connection has invalid extra JSON (#66593)
Co-authored-by: Shashwati <[email protected]>
---
.../src/airflow/ui/src/pages/Connections/ConnectionForm.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx
b/airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx
index d33fef8a692..8a993e4ef2a 100644
--- a/airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx
@@ -81,7 +81,11 @@ const ConnectionForm = ({
setValue("conn_type", selectedConnType, {
shouldDirty: true,
});
- setConf(JSON.stringify(JSON.parse(initialConnection.extra), undefined, 2));
+ try {
+ setConf(JSON.stringify(JSON.parse(initialConnection.extra), undefined,
2));
+ } catch {
+ setConf(initialConnection.extra);
+ }
}, [selectedConnType, initialConnection, setConf, setValue]);
// Automatically reset form when conf is fetched