Merge pull request #22662

* core: runnables: special handling GeneratorExit because no error
This commit is contained in:
Riccardo Schirone 2024-06-25 14:42:03 +02:00 committed by GitHub
parent ad50702934
commit 4530d851e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1892,6 +1892,8 @@ class Runnable(Generic[Input, Output], ABC):
final_input_supported = False
else:
final_input = ichunk
except GeneratorExit:
run_manager.on_chain_end(final_output, inputs=final_input)
except BaseException as e:
run_manager.on_chain_error(e, inputs=final_input)
raise