Closed Bogdanp closed 6 years ago
I think this issue was correctly identified in https://github.com/encode/apistar/issues/490, but mistakenly characterised as "fixed". It would appear to be fixed by the change that was made to pass state
around, but that isn't the case as you can see from my changes to the injector.
This fixes an issue where
on_error
hooks don't have access to the same component instances as other hooks and handlers. In addition, this may fix other resolution issues/heisenbugs but I was mainly concerned with fixingon_error
as any code right now that tries to clean up resources on error (eg. db connections) based on a component instance is probably incorrect.