Skip to content

Commit

Permalink
Remove value logging from error raised (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
mallport authored Jun 25, 2024
1 parent f4d174d commit 21b4478
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/dapla_pseudo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 21b4478

Please sign in to comment.