Skip to content

Conversation

@littlehongman
Copy link

This PR addresses issue #86.

Pydantic error objects may include a raw Python exception inside ctx["error"], which breaks JSON serialization. This update replaces the exception instance with a JSON-safe structure:

{"type": type(exc).__name__, "message": str(exc)}

All other ctx fields remain unchanged. No functional behavior is altered.

@littlehongman littlehongman force-pushed the littlehongman/86-fix-ctx-error-serialization branch from 0692ee3 to b5e558e Compare November 20, 2025 03:18
@stv8
Copy link
Contributor

stv8 commented Nov 20, 2025

hey! is there any way you can add a small test for this?

@littlehongman
Copy link
Author

hey! is there any way you can add a small test for this?

Just added. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants