MCPcopy Index your code
hub / github.com/cli/cli / printError

Function printError

pkg/cmd/ssh-key/list/list.go:121–129  ·  view source on GitHub ↗
(w io.Writer, err error)

Source from the content-addressed store, hash-verified

119}
120
121func printError(w io.Writer, err error) {
122 fmt.Fprintln(w, "warning: ", err)
123 var httpErr api.HTTPError
124 if errors.As(err, &httpErr) {
125 if msg := httpErr.ScopesSuggestion(); msg != "" {
126 fmt.Fprintln(w, msg)
127 }
128 }
129}

Callers 1

listRunFunction · 0.70

Calls 1

ScopesSuggestionMethod · 0.95

Tested by

no test coverage detected