Skip to content

Commit b5738d8

Browse files
committed
fix new deprecation errors
1 parent 94fe5bf commit b5738d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/web/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ async fn apply_middleware(
491491
.report_request_timeouts
492492
.then_some(middleware::from_fn(log_timeouts_to_sentry)),
493493
))
494-
.layer(option_layer(
495-
context.config.request_timeout.map(TimeoutLayer::new),
496-
))
494+
.layer(option_layer(context.config.request_timeout.map(|to| {
495+
TimeoutLayer::with_status_code(StatusCode::REQUEST_TIMEOUT, to)
496+
})))
497497
.layer(Extension(context.pool.clone()))
498498
.layer(Extension(context.async_build_queue.clone()))
499499
.layer(Extension(context.service_metrics.clone()))

0 commit comments

Comments
 (0)