You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Users\<truncated>\lib\site-packages\sanic_ext\extensions\injection\injector.py", line 31, in finalize_injections
injection_registry.finalize(router_types)
File "C:\Users\<truncated>\lib\site-packages\sanic_ext\extensions\injection\registry.py", line 32, in finalize
constructor.prepare(self, allowed_types)
File "C:\Users\<truncated>\lib\site-packages\sanic_ext\extensions\injection\constructor.py", line 81, in prepare
raise InitError(
sanic_ext.exceptions.InitError: Unable to resolve dependencies for 'get_something'. Could not find the following dependencies:
- request: <class '__main__.InheritedRequest'>.
Make sure the dependencies are declared using ext.injection. See https://sanicframework.org/en/plugins/sanic-ext/injection.html#injecting-services for more details.
The text was updated successfully, but these errors were encountered:
kijk2869
changed the title
[Bug]
[Bug] Dependency injection not works with inherited request class
May 23, 2022
Describe the bug
Injector does not recognize the inherited request class as Sanic request class.
Screenshots
Not applicable
To Reproduce
Expected behavior
The injector should skip the request parameter, so that the error not occurs.
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: