From dcd08d9640943d03a2c4e878b6d992909b4ef070 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Tue, 6 Aug 2024 10:37:31 +0200 Subject: [PATCH] [gcp][fix] Improve error message (#2161) --- plugins/gcp/fix_plugin_gcp/resources/base.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/gcp/fix_plugin_gcp/resources/base.py b/plugins/gcp/fix_plugin_gcp/resources/base.py index be00e8a026..c8295c50aa 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/base.py +++ b/plugins/gcp/fix_plugin_gcp/resources/base.py @@ -651,19 +651,18 @@ def __exit__( except Exception as ex: errors = {f"ParseError:unknown:{ex}"} pass - error_summary = ", ".join(errors) + error_summary = " Error Codes: " + (", ".join(errors)) if errors else "" if errors and errors.issubset(self.expected_errors): log.info( f"Expected Exception while collecting{self.extra_info} ({exc_type.__name__}): " - f"{error_details} Error Codes: {error_summary}. Ignore." + f"{error_details}{error_summary}. Ignore." ) return True if not Config.gcp.discard_account_on_resource_error: self.core_feedback.error( - f"Error while collecting{self.extra_info} ({exc_type.__name__}): " - f"{error_details} Error Codes: {error_summary}", + f"Error while collecting{self.extra_info} ({exc_type.__name__}): " f"{error_details}{error_summary}", log, ) return True