MCPcopy
hub / github.com/mislav/hub / FormatError

Function FormatError

github/client.go:1175–1180  ·  view source on GitHub ↗

FormatError annotates an HTTP response error with user-friendly messages

(action string, err error)

Source from the content-addressed store, hash-verified

1173
1174// FormatError annotates an HTTP response error with user-friendly messages
1175func FormatError(action string, err error) error {
1176 if e, ok := err.(*errorInfo); ok {
1177 return formatError(action, e)
1178 }
1179 return err
1180}
1181
1182func formatError(action string, e *errorInfo) error {
1183 var reason string

Callers 10

browseFunction · 0.92
transformInitArgsFunction · 0.92
getCloneUrlFunction · 0.92
deleteRepoFunction · 0.92
pullRequestFunction · 0.92
transformRemoteArgsFunction · 0.92
forkFunction · 0.92
createFunction · 0.92
TestClient_FormatErrorFunction · 0.85
checkStatusFunction · 0.85

Calls 1

formatErrorFunction · 0.85

Tested by 1

TestClient_FormatErrorFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…