Repository navigation
Commit 8f16e57
committed
Python: fix(core): record the stream error before closing on failure paths
The reorder in d8b7a39 closed the stream before _handle_stream_error ran.
close() consumes the one-shot cleanup hook run with no _stream_error set,
so observability hooks recorded the failure without error.type and any
retry/persistence hook saw an already-finalized stream. Run the error
handling first and close in a finally so the provider stream is still
released when a hook raises.
Signed-off-by: Yufeng He <[email protected]>1 parent d8b7a39 commit 8f16e57
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4012 | 4012 | | |
4013 | 4013 | | |
4014 | 4014 | | |
4015 | | - | |
4016 | | - | |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
4017 | 4023 | | |
4018 | 4024 | | |
4019 | 4025 | | |
| |||
0 commit comments