MCPcopy Index your code
hub / github.com/docker/docker-agent / Error

Method Error

pkg/modelerrors/modelerrors.go:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (e *StatusError) Error() string {
35 underlying := e.Err.Error()
36 // Lift structured details out of the SDK error envelope (URL + status +
37 // JSON body) when possible, so the user sees what the provider actually
38 // said instead of a generic "400 Bad Request".
39 if details := parseProviderError(underlying); details != "" {
40 return fmt.Sprintf("HTTP %d: %s", e.StatusCode, details)
41 }
42 return fmt.Sprintf("HTTP %d: %s", e.StatusCode, underlying)
43}
44
45func (e *StatusError) Unwrap() error {
46 return e.Err

Callers 15

TestWrapAnthropicErrorFunction · 0.95
TestStatusErrorFunction · 0.95
TestWrapHTTPErrorFunction · 0.95
TestStatusErrorEdgeCasesFunction · 0.95
TestNewMemoryDatabaseFunction · 0.45
TestAddMemoryFunction · 0.45
TestUpdateMemoryFunction · 0.45
ensureDBMethod · 0.45
AddMemoryMethod · 0.45

Calls 1

parseProviderErrorFunction · 0.85

Tested by 15

TestWrapAnthropicErrorFunction · 0.76
TestStatusErrorFunction · 0.76
TestWrapHTTPErrorFunction · 0.76
TestStatusErrorEdgeCasesFunction · 0.76
TestNewMemoryDatabaseFunction · 0.36
TestAddMemoryFunction · 0.36
TestUpdateMemoryFunction · 0.36