As of PR #4409, the aggregator API has http_metrics_middleware wired up (shared from janus_aggregator_core), but its Error::into_response() doesn't insert ErrorCode into response extensions the way the aggregator's Error::to_response() does. This means all error responses get labeled "unknown" in the error_code metric attribute instead of a descriptive code.
Each variant in aggregator_api::Error should insert an ErrorCode into the response extensions, following the pattern in aggregator/src/aggregator/error.rs.
As of PR #4409, the aggregator API has
http_metrics_middlewarewired up (shared fromjanus_aggregator_core), but itsError::into_response()doesn't insertErrorCodeinto response extensions the way the aggregator'sError::to_response()does. This means all error responses get labeled"unknown"in theerror_codemetric attribute instead of a descriptive code.Each variant in
aggregator_api::Errorshould insert anErrorCodeinto the response extensions, following the pattern inaggregator/src/aggregator/error.rs.