From 83b5f7eee0f1b926096ed47a3f750a116f5752df Mon Sep 17 00:00:00 2001 From: Paul Tiplady Date: Tue, 22 Feb 2022 23:43:45 -0800 Subject: [PATCH] Log error message for session SQLs (#92) --- tap_mysql/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tap_mysql/connection.py b/tap_mysql/connection.py index 35574d0..cfd59dc 100644 --- a/tap_mysql/connection.py +++ b/tap_mysql/connection.py @@ -39,8 +39,8 @@ def run_session_sqls(connection): for sql in session_sqls: try: run_sql(connection, sql) - except pymysql.err.InternalError: - warnings.append(f'Could not set session variable: {sql}') + except pymysql.err.InternalError as exc: + warnings.append(f'Could not set session variable `{sql}`: {exc}') if warnings: LOGGER.warning('Encountered non-fatal errors when configuring session that could impact performance:')