The pokemon service example registers an AlbHealthCheckLayer for /ping inside the PokemonServiceConfig builder. The layer never handles the request as /ping is already defined as a Smithy operation (CheckHealth), so the router handles it first. And even if CheckHealth didn't exist, the layer would still not work because it's placed inside the builder, where unknown routes are rejected before the layer sees them (see smithy-lang/smithy-examples#191).
Should the example either remove the AlbHealthCheckLayer (since it's dead code), or move it outside the builder and change it to a different path like /health to actually demonstrate the layer's usage?
Note: removing the CheckHealth operation from the Smithy model would impact the lambda example which also depends on it and doesn't use AlbHealthCheckLayer.
The pokemon service example registers an
AlbHealthCheckLayerfor/pinginside the PokemonServiceConfig builder. The layer never handles the request as/pingis already defined as a Smithy operation (CheckHealth), so the router handles it first. And even ifCheckHealthdidn't exist, the layer would still not work because it's placed inside the builder, where unknown routes are rejected before the layer sees them (see smithy-lang/smithy-examples#191).Should the example either remove the
AlbHealthCheckLayer(since it's dead code), or move it outside the builder and change it to a different path like/healthto actually demonstrate the layer's usage?Note: removing the
CheckHealthoperation from the Smithy model would impact the lambda example which also depends on it and doesn't useAlbHealthCheckLayer.