Skip to content

fix bedrock pii redaction null value handling#2

Merged
Quentin-M merged 1 commit intosearch_tools_fixfrom
fix/bedrock-pii-redaction
Feb 25, 2026
Merged

fix bedrock pii redaction null value handling#2
Quentin-M merged 1 commit intosearch_tools_fixfrom
fix/bedrock-pii-redaction

Conversation

@ryangoldblatt-bm
Copy link
Copy Markdown
Collaborator

Fix the following error when applying Bedrock PII guardrails:

{"message": "Guardrail log redaction failed: 'NoneType' object is not iterable", "level": "WARNING", "timestamp": "2026-02-24T12:50:53.163260"}

Basically the current processing of the Bedrock API response does not handle null values gracefully, e.g. Bedrock API response snippet:

'sensitiveInformationPolicy': {'piiEntities': [{'action': 'NONE', 'detected': True, 'match': 'joebloggs@gmail.com', 'type': 'EMAIL'}], 'regexes': None}, 'topicPolicy': None, 'wordPolicy': None}],

@Quentin-M
Copy link
Copy Markdown
Owner

Just merge away mate, it's a working repo.

@Quentin-M Quentin-M merged commit baefc29 into search_tools_fix Feb 25, 2026
1 check passed
@Quentin-M Quentin-M deleted the fix/bedrock-pii-redaction branch February 25, 2026 12:26
Quentin-M pushed a commit that referenced this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants