fix(backend): Add error handling for auto-credentials store lookup

Wrap get_creds_by_id call in try/except in the auto-credentials
validation path to match the error handling pattern used for regular
credentials.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nicholas Tindle
2026-02-06 16:53:29 -06:00
parent 8b7053c1de
commit c5abc01f25

View File

@@ -355,8 +355,15 @@ async def _validate_node_input_credentials(
if field_value and isinstance(field_value, dict):
cred_id = field_value.get("_credentials_id")
if cred_id and isinstance(cred_id, str):
creds_store = get_integration_credentials_store()
creds = await creds_store.get_creds_by_id(user_id, cred_id)
try:
creds_store = get_integration_credentials_store()
creds = await creds_store.get_creds_by_id(user_id, cred_id)
except Exception as e:
has_missing_credentials = True
credential_errors[node.id][
field_name
] = f"Credentials not available: {e}"
continue
if not creds:
has_missing_credentials = True
credential_errors[node.id][field_name] = (