Need magic PII-free debugging method for API

This commit is contained in:
Kenneth Kehl
2024-06-11 10:34:57 -07:00
parent bb6b0936d3
commit 76c34ffae6
9 changed files with 65 additions and 38 deletions

View File

@@ -11,7 +11,7 @@ from app.dao.notifications_dao import (
)
from app.enums import KeyType, NotificationStatus, NotificationType
from app.models import Notification
from app.utils import hilite, scrub, utc_now
from app.utils import hilite, utc_now
from app.v2.errors import BadRequestError
from notifications_utils.recipients import (
format_email_address,
@@ -110,7 +110,9 @@ def persist_notification(
formatted_recipient = validate_and_format_phone_number(
recipient, international=True
)
current_app.logger.info(hilite(scrub(f"Persisting notification with recipient {formatted_recipient}")))
current_app.logger.info(
hilite(f"Persisting notification with recipient {formatted_recipient}")
)
recipient_info = get_international_phone_info(formatted_recipient)
notification.normalised_to = formatted_recipient
notification.international = recipient_info.international