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))
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.rsObserved 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:Proposed Fix
Update the routes to use the new
{}syntax: