We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fe5bf commit b5738d8Copy full SHA for b5738d8
src/web/mod.rs
@@ -491,9 +491,9 @@ async fn apply_middleware(
491
.report_request_timeouts
492
.then_some(middleware::from_fn(log_timeouts_to_sentry)),
493
))
494
- .layer(option_layer(
495
- context.config.request_timeout.map(TimeoutLayer::new),
496
- ))
+ .layer(option_layer(context.config.request_timeout.map(|to| {
+ TimeoutLayer::with_status_code(StatusCode::REQUEST_TIMEOUT, to)
+ })))
497
.layer(Extension(context.pool.clone()))
498
.layer(Extension(context.async_build_queue.clone()))
499
.layer(Extension(context.service_metrics.clone()))
0 commit comments