Skip to content

Wire DisplayMode into Display for Error or drop the dead formatting paths #450

Description

@RAprogramm

DisplayMode::current() (env detection via MASTERROR_ENV / KUBERNETES_SERVICE_HOST) exists and is documented in README as controlling error output per environment, but Display for Error (src/app_error/core/error.rs) branches only on the colored feature. fmt_prod/fmt_local/fmt_staging in src/app_error/core/display.rs are #[allow(dead_code)] with zero production call sites, and fmt_prod's field filtering handles only FieldRedaction::Redact (not Hash/Last4).

Decide: wire DisplayMode dispatch into Display (README-promised behavior — prod: compact JSON, local: multi-line, staging: JSON + source_chain) with full redaction-policy handling, or delete the dead code and the claims. Wiring it is the differentiator vs anyhow/thiserror.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions