From b4f35282253d4b51410c9c31dfabe92125b6797d Mon Sep 17 00:00:00 2001 From: Cam Date: Sat, 9 May 2026 13:20:19 -0500 Subject: [PATCH] Add warning for legacy event webhooks from Neon --- alta_open_lambda/lambda_function.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alta_open_lambda/lambda_function.py b/alta_open_lambda/lambda_function.py index 9998519..0f10a92 100644 --- a/alta_open_lambda/lambda_function.py +++ b/alta_open_lambda/lambda_function.py @@ -230,6 +230,14 @@ def lambda_handler(event: dict, _: dict) -> None: if not (event_trigger := neon_response.get("eventTrigger")): return + # This will be read as a string, not a boolean. Since we're only using this + # as a temporary measure to migrate off the legacy webhooks, I don't think + # we need to worry about casting into the correct data type. + legacy = neon_response.get('customParameters', {}).get('legacy') + if legacy is not None and legacy == 'true': + logger.warning('LEGACY EVENT DETECTED') + logger.warning('This type of webhook will be deprecated soon - please update your webhook.') + neon_id = None match event_trigger: