Skip to content

Conversation

@FalkWoldmann
Copy link
Contributor

@FalkWoldmann FalkWoldmann commented Aug 15, 2025

Motivation

Solution

  • Implement `TimeoutLayer::with_status_code'
  • Mark TimeoutLayer::new as deprecated

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@FalkWoldmann FalkWoldmann requested a review from jplatte August 17, 2025 05:21
@FalkWoldmann
Copy link
Contributor Author

Hi @jplatte, sorry to ping you, but would you be able to check this PR again? I would like to use this feature soon :)

@jplatte
Copy link
Member

jplatte commented Oct 10, 2025

Always fine to ping me after a week or two of inactivity :)
I'll try to get to this soon.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience! Do you need this in a release?

@jplatte jplatte merged commit 50beeaf into tower-rs:main Oct 14, 2025
11 checks passed
@FalkWoldmann
Copy link
Contributor Author

Thanks for the review :) a release would be cool, since we can get rid of some custom code, but it's not urgent

@seanmonstar seanmonstar mentioned this pull request Nov 24, 2025
@frederikhors
Copy link

I don't understand why the deprecation of the new if the default StatusCode::REQUEST_TIMEOUT is ok for most of people.

@teohhanhui
Copy link

teohhanhui commented Nov 25, 2025

@frederikhors #579 (comment)

I don't think HTTP 408 Request Timeout is an okay default at all... The closest thing to a sensible default would be HTTP 503 Service Unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should TimeoutLayer middleware allow returning other status codes?

4 participants