MCPcopy Create free account
hub / github.com/codehamr/codehamr / errorMessageFromBody

Function errorMessageFromBody

internal/llm/llm.go:445–461  ·  view source on GitHub ↗

errorMessageFromBody extracts the user-facing string from a non-2xx body. hamrpass wraps errors as `{"error":{"message":...,"provider_hint":...}}`; we prefer provider_hint (providers stash the human diagnostic there), fall back to message, then to the raw first line so non-hamrpass backends still su

(b []byte)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

doPostMethod · 0.85

Calls 1

firstLineFunction · 0.70

Tested by

no test coverage detected