Skip to content

fix: handle empty payload gracefully - #683

Merged
nborges-aws merged 1 commit into
mainfrom
empty-payload-fix
Sep 28, 2026
Merged

nborges-aws merged 1 commit into
mainfrom
empty-payload-fix

Conversation

@nborges-aws

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
Gracefully handle empty event payloads in AgentCoreMemorySessionManager.read_session:

  • Fall back to legacy lookup when the event has empty payload
  • Return None when the legacy event also has no payload
  • Add test coverage for empty payload path

This prevents IndexError being thrown by a valid, empty payload during session restoration.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nborges-aws
nborges-aws requested a review from a team September 28, 2026 12:48
@github-actions github-actions Bot added the size/s PR size: S label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ No Breaking Changes Detected

No public API breaking changes found in this PR.

@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 28, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 28, 2026
@nborges-aws
nborges-aws merged commit 3a6496e into main Sep 28, 2026
44 checks passed

This branch was successfully deployed

1 active deployment
auto-approve — 3240f2b6 Deployed Sep 28, 2026 by nborges-aws via Test (policy) #1604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants