buildConfigError enriches a typed ConfigError with the canonical per-subtype recovery hint before returning it, so the wire envelope emitted via BuildAPIError always carries a hint for known config subtypes.
(p errs.Problem)
| 232 | // per-subtype recovery hint before returning it, so the wire envelope |
| 233 | // emitted via BuildAPIError always carries a hint for known config subtypes. |
| 234 | func buildConfigError(p errs.Problem) *errs.ConfigError { |
| 235 | // Config categories have authoritative recovery guidance, so the curated |
| 236 | // ConfigHint deliberately overrides any server detail lifted into p.Hint |
| 237 | // (the opposite precedence from the CategoryAPI arm, where the lifted |
| 238 | // detail wins). |
| 239 | p.Hint = ConfigHint(p.Subtype) |
| 240 | return &errs.ConfigError{Problem: p} |
| 241 | } |
| 242 | |
| 243 | // ConfigHint returns the canonical per-subtype recovery hint for a typed |
| 244 | // ConfigError emitted via BuildAPIError. |
no test coverage detected