From badb02c4aa7d4cdd290bab14db1bcec86b2ae2c2 Mon Sep 17 00:00:00 2001 From: Vuong Date: Fri, 19 Apr 2024 16:17:57 +0100 Subject: [PATCH 1/2] add another error type that should be classed as NotFound --- src/databricks/labs/lsql/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/databricks/labs/lsql/core.py b/src/databricks/labs/lsql/core.py index 0c008b90..806ef7b1 100644 --- a/src/databricks/labs/lsql/core.py +++ b/src/databricks/labs/lsql/core.py @@ -448,6 +448,8 @@ def _raise_if_needed(status: StatementStatus): raise NotFound(error_message) if "DELTA_TABLE_NOT_FOUND" in error_message: raise NotFound(error_message) + if "does not exists" in error_message: + raise NotFound(error_message) if "DELTA_MISSING_TRANSACTION_LOG" in error_message: raise DataLoss(error_message) mapping = { From 4aadae505d728fc76a1a694232c4cd063a75f75b Mon Sep 17 00:00:00 2001 From: Serge Smertin <259697+nfx@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:11:35 +0200 Subject: [PATCH 2/2] Update src/databricks/labs/lsql/core.py --- src/databricks/labs/lsql/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/databricks/labs/lsql/core.py b/src/databricks/labs/lsql/core.py index 806ef7b1..541c411d 100644 --- a/src/databricks/labs/lsql/core.py +++ b/src/databricks/labs/lsql/core.py @@ -448,7 +448,7 @@ def _raise_if_needed(status: StatementStatus): raise NotFound(error_message) if "DELTA_TABLE_NOT_FOUND" in error_message: raise NotFound(error_message) - if "does not exists" in error_message: + if "does not exist" in error_message: raise NotFound(error_message) if "DELTA_MISSING_TRANSACTION_LOG" in error_message: raise DataLoss(error_message)