Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server example wrongly applies healthcheck layer in B position #3607

Open
david-perez opened this issue Apr 26, 2024 · 0 comments
Open

Server example wrongly applies healthcheck layer in B position #3607

david-perez opened this issue Apr 26, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers server Rust server SDK

Comments

@david-perez
Copy link
Contributor

Our Pokemon service example applies AlbHealthCheckLayer in B position after routing. This is a bad example because health checks should run before routing, since typically they should not be modelled.

Docs for the aws_smithy_http_server::layer module explicitly mention that layers within it should wrap the router; it wouldn't hurt to link to B position middleware in the Rust book.

This appears to be a regression. When we created the module in #2865 the example worked as intended but when we introduced the generated config object we messed it up.

@david-perez david-perez added server Rust server SDK bug Something isn't working good first issue Good for newcomers labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers server Rust server SDK
Projects
None yet
Development

No branches or pull requests

1 participant