From 21b4478ce30565d70621ea5886f37019908238a0 Mon Sep 17 00:00:00 2001 From: Michael Moen Allport Date: Tue, 25 Jun 2024 13:52:55 +0200 Subject: [PATCH] Remove value logging from error raised (#407) --- src/dapla_pseudo/utils.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/dapla_pseudo/utils.py b/src/dapla_pseudo/utils.py index c9460aea..68539b0f 100644 --- a/src/dapla_pseudo/utils.py +++ b/src/dapla_pseudo/utils.py @@ -116,9 +116,7 @@ def build_pseudo_field_request( ) requests.append(req) except ValidationError as e: - raise Exception( - f"Path: {field.path}, Values: {field.get_value()}" - ) from e + raise Exception(f"Path or column: {field.path}") from e case PseudoOperation.DEPSEUDONYMIZE: for field in matched_fields.values(): try: @@ -131,9 +129,7 @@ def build_pseudo_field_request( ) requests.append(req) except ValidationError as e: - raise Exception( - f"Path: {field.path}, Values: {field.get_value()}" - ) from e + raise Exception(f"Path or column: {field.path}") from e case PseudoOperation.REPSEUDONYMIZE: if target_rules is not None: @@ -150,9 +146,7 @@ def build_pseudo_field_request( ) requests.append(req) except ValidationError as e: - raise Exception( - f"Path: {field.path}, Values: {field.get_value()}" - ) from e + raise Exception(f"Path or column: {field.path}") from e else: raise ValueError("Found no target rules") return requests