Skip to content

[Bug] Application panics at startup due to legacy Axum route parameter syntax #148

Description

@ryuknull

Description

The application panics during the router initialization because it uses legacy Axum syntax for path parameters (e.g., :provider) instead of the required braces syntax ({provider}).

Affected Files

crates/infrastructure/transport-axum/src/routes.rs

Observed Panic

The server fails to start with a panic message indicating an invalid route template.

Relevant Code

Lines 51, 53, and 73 in crates/infrastructure/transport-axum/src/routes.rs:

.route("/api/telemetry/:provider", get(telemetry_provider))
.route("/api/telemetry/:provider/latency", get(telemetry_latency_distribution))
.route("/api/resilience/:provider/reset", post(handlers::resilience::reset_provider))

Proposed Fix

Update the routes to use the new {} syntax:

.route("/api/telemetry/{provider}", get(telemetry_provider))
.route("/api/telemetry/{provider}/latency", get(telemetry_latency_distribution))
.route("/api/resilience/{provider}/reset", post(handlers::resilience::reset_provider))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions