MCPcopy Create free account
hub / github.com/cli/cli / Error

Method Error

pkg/search/searcher.go:313–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311}
312
313func (err httpError) Error() string {
314 if err.StatusCode != 422 || len(err.Errors) == 0 {
315 return fmt.Sprintf("HTTP %d: %s (%s)", err.StatusCode, err.Message, err.RequestURL)
316 }
317 query := strings.TrimSpace(err.RequestURL.Query().Get("q"))
318 return fmt.Sprintf("Invalid search query %q.\n%s", query, err.Errors[0].Message)
319}
320
321func handleHTTPError(resp *http.Response) error {
322 httpError := httpError{

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected