MCPcopy
hub / github.com/larksuite/cli / buildConfigError

Function buildConfigError

internal/errclass/classify.go:234–241  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

232// per-subtype recovery hint before returning it, so the wire envelope
233// emitted via BuildAPIError always carries a hint for known config subtypes.
234func 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.

Callers 1

BuildAPIErrorFunction · 0.85

Calls 1

ConfigHintFunction · 0.85

Tested by

no test coverage detected