Repository navigation
feat: asgi request - #2467
feat: asgi request#2467
Conversation
3e4df77 to
01a1305
Compare
01a1305 to
39256f0
Compare
39256f0 to
79eef83
Compare
| ): | ||
| response = await self.func(scope) | ||
| except Exception: | ||
| logger.exception("Exception occurred while processing request") |
There was a problem hiding this comment.
Should we use this logger or from the context? Also, I suggest to add an exception traceback by logger.error(..., exc_info=exception)
There was a problem hiding this comment.
Here I replaced the logger with the application logger and also added the logger forwarding to the context so it could be used in the handler.
|
@Sehat1137 can you review, please? |
|
I think we need support new features into AsyncAPI schema, because right now we don't see any information about required headers or query params |
next pr |
e51b4aa to
20aa613
Compare
5746ce4 to
d549237
Compare
| ) -> None: | ||
| self.routes = list(asgi_routes) | ||
| context = context or ContextRepo() | ||
| context.set_global("app", self) |
There was a problem hiding this comment.
It is already set in super.__init__, there is no need to double this logic here
There was a problem hiding this comment.
The problem is that I need access to context.app when registering the handler, which happens before the parent class installs the app in the context. In this case, can I change the behavior in faststream._internal.application.Application?
d549237 to
d17065c
Compare
d17065c to
036e6ad
Compare
Description
Fixes #1798
TODO:
DependstestsBackward compatibility with old HTTP handlers that receive a scope argument is preserved.
Example usage:
Type of change
Please delete options that are not relevant.
Checklist
just lintshows no errors)just test-coveragejust static-analysis