Skip to content

Comments

docs: fix map operation examples to return JSON-serializable dict#312

Merged
yaythomas merged 1 commit intomainfrom
fix-map-exampels
Feb 20, 2026
Merged

docs: fix map operation examples to return JSON-serializable dict#312
yaythomas merged 1 commit intomainfrom
fix-map-exampels

Conversation

@yaythomas
Copy link
Member

Fix issue #301: Map operation examples were returning BatchResult directly, which is not JSON serializable and causes Lambda to fail.

Changes:

  • Update all handler return types from BatchResult[T] to dict
  • Add .to_dict() calls to convert BatchResult before returning
  • Add explanatory comments about JSON serialization requirement
  • Update "Getting started" description to reflect dict return type
  • Keep one example showing how to extract and filter results

Issue #, if available:

Description of changes:

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

Fix issue #301: Map operation examples were returning BatchResult
directly, which is not JSON serializable and causes Lambda to fail.

Changes:
- Update all handler return types from BatchResult[T] to dict
- Add .to_dict() calls to convert BatchResult before returning
- Add explanatory comments about JSON serialization requirement
- Update "Getting started" description to reflect dict return type
- Keep one example showing how to extract and filter results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yaythomas yaythomas merged commit aa1a435 into main Feb 20, 2026
10 of 12 checks passed
@yaythomas yaythomas deleted the fix-map-exampels branch February 20, 2026 22:04
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.

3 participants