ref(server): Use async/await in all endpoints#1862
Conversation
|
The failing integration test shows that error reporting has changed with my refactored store endpoints. Since the endpoints now return an error, See the following excerpt. The first line is our manual log, the other two are now added by actix_web: I'm looking into a quick fix. It's useful to return an error, but on the other hand we want clean error logs and reports. Update: Like in the past, the only workaround is to convert |
Co-authored-by: Oleksandr <1931331+olksdr@users.noreply.github.com>
jjbayer
left a comment
There was a problem hiding this comment.
Did not look at the details but in general this looks good to me! Great improvement in code readability.
|
|
||
| /// Consume the remaining response body. | ||
| pub async fn consume(mut self) { | ||
| while let Ok(Some(_)) = self.chunk().await {} |
There was a problem hiding this comment.
If self.chunk() returns an error, this function will silently fail. Is that the same behavior as we had before?
There was a problem hiding this comment.
Yes, we want to consume until there's an error and then bail.
iker-barriocanal
left a comment
There was a problem hiding this comment.
So much simpler! 🙌
* master: feat(metrics): Tag the sample decision on count_per_root_project (#1870) feat(protocol): Add sourcemap debug image type to protocol (#1869) ref(statsd): Revert back the adition of metric names as tag on Sentry errors (#1873) feat(profiling): Add PHP support (#1871) fix(panic): revert sentry-types to 0.20.1 (#1872) ref(server): Use async/await in all endpoints (#1862) ref: Buffer envelopes for broken project states (#1856) meta: Remove accidentally added GeoIP file (#1866)
Moves all endpoints and most HTTP utilities to async/await. This is to prepare
upgrading the web framework.
#skip-changelog