Skip to content

Insert ErrorCode into aggregator API response extensions for accurate metrics labeling #4425

@jcjones

Description

@jcjones

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions