MCPcopy Index your code
hub / github.com/coder/coder / providerErrorDetail

Function providerErrorDetail

coderd/x/chatd/chaterror/provider_error.go:34–39  ·  view source on GitHub ↗
(providerErr *fantasy.ProviderError)

Source from the content-addressed store, hash-verified

32}
33
34func providerErrorDetail(providerErr *fantasy.ProviderError) string {
35 if detail := providerErrorResponseMessage(providerErr.ResponseBody); detail != "" {
36 return detail
37 }
38 return strings.TrimSpace(providerErr.Message)
39}
40
41// providerErrorResponseMessage extracts error.message from the common
42// provider error JSON envelope after stripping any dumped HTTP status

Callers 1

Calls 1

Tested by

no test coverage detected