Skip to content

Pokemon service example: AlbHealthCheckLayer for /ping is redundant and unreachable #4631

@PeterUlb

Description

@PeterUlb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions