Commit 3130064
Fix structlog JSON serialization crash on non-serializable objects
Wrap the enc_hook in json_dumps() with a safe_default() fallback that
catches TypeError and falls back to str(). This prevents the logging
pipeline from crashing when log event dicts contain objects that
msgspec cannot serialize.
Closes: #62472
Closes: #62201
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 94ece75 commit 3130064
File tree
1 file changed
+11
-1
lines changed1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
320 | 330 | | |
321 | 331 | | |
322 | 332 | | |
| |||
0 commit comments