From 21d4376224a04565d659907b1f2617afe75c2632 Mon Sep 17 00:00:00 2001 From: Derek Visch Date: Mon, 27 Mar 2023 14:41:03 -0600 Subject: [PATCH 1/3] Discovery should fail when there's an error --- tap_spreadsheets_anywhere/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tap_spreadsheets_anywhere/__init__.py b/tap_spreadsheets_anywhere/__init__.py index 32be6a6..c136419 100644 --- a/tap_spreadsheets_anywhere/__init__.py +++ b/tap_spreadsheets_anywhere/__init__.py @@ -88,7 +88,8 @@ def discover(config): ) ) except Exception as err: - LOGGER.error(f"Unable to write Catalog entry for '{table_spec['name']}' - it will be skipped due to error {err}") + LOGGER.error(f"Unable to write Catalog entry for '{table_spec['name']}' - it will be skipped due too error {err}") + exit(1) return Catalog(streams) From fec42b915123609c3c0cc30fe36fb08bbcbf91fa Mon Sep 17 00:00:00 2001 From: Derek Visch Date: Mon, 27 Mar 2023 16:47:46 -0400 Subject: [PATCH 2/3] Update __init__.py Let's keep the data from the error so we have a nice stack trace as well to use. --- tap_spreadsheets_anywhere/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_spreadsheets_anywhere/__init__.py b/tap_spreadsheets_anywhere/__init__.py index c136419..5e1742b 100644 --- a/tap_spreadsheets_anywhere/__init__.py +++ b/tap_spreadsheets_anywhere/__init__.py @@ -89,7 +89,7 @@ def discover(config): ) except Exception as err: LOGGER.error(f"Unable to write Catalog entry for '{table_spec['name']}' - it will be skipped due too error {err}") - exit(1) + raise err return Catalog(streams) From c7faad62ed21602d838c06e66d8da85384ed938a Mon Sep 17 00:00:00 2001 From: Derek Visch Date: Wed, 29 Mar 2023 12:36:04 -0400 Subject: [PATCH 3/3] Update __init__.py --- tap_spreadsheets_anywhere/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_spreadsheets_anywhere/__init__.py b/tap_spreadsheets_anywhere/__init__.py index 5e1742b..bd57fcb 100644 --- a/tap_spreadsheets_anywhere/__init__.py +++ b/tap_spreadsheets_anywhere/__init__.py @@ -88,7 +88,7 @@ def discover(config): ) ) except Exception as err: - LOGGER.error(f"Unable to write Catalog entry for '{table_spec['name']}' - it will be skipped due too error {err}") + LOGGER.error(f"Unable to write Catalog entry for '{table_spec['name']}' - it will be skipped due to error {err}") raise err return Catalog(streams)