From 303306588caf8edc561a376c0eeb6f35f1573462 Mon Sep 17 00:00:00 2001 From: Fred Zhang Date: Thu, 9 May 2024 20:14:33 -0700 Subject: [PATCH] m --- src/dataconnect/errors.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dataconnect/errors.ts b/src/dataconnect/errors.ts index af4d2157e6d..4e2b815af03 100644 --- a/src/dataconnect/errors.ts +++ b/src/dataconnect/errors.ts @@ -6,6 +6,9 @@ const INCOMPATIBLE_CONNECTOR_TYPE = "INCOMPATIBLE_CONNECTOR"; export function getIncompatibleSchemaError(err: any): IncompatibleSqlSchemaError | undefined { const incompatibles = errorDetails(err, INCOMPATIBLE_SCHEMA_ERROR_TYPESTRING); + if (incompatibles.length === 0) { + return undefined; + } // Should never get multiple incompatible schema errors const incompatible = incompatibles[0]; // Extract the violation type from the precondition error detail.