MCPcopy
hub / github.com/github/github-mcp-server / newGitHubAPIError

Function newGitHubAPIError

pkg/errors/error.go:22–28  ·  view source on GitHub ↗

NewGitHubAPIError creates a new GitHubAPIError with the provided message, response, and error.

(message string, resp *github.Response, err error)

Source from the content-addressed store, hash-verified

20
21// NewGitHubAPIError creates a new GitHubAPIError with the provided message, response, and error.
22func newGitHubAPIError(message string, resp *github.Response, err error) *GitHubAPIError {
23 return &GitHubAPIError{
24 Message: message,
25 Response: resp,
26 Err: err,
27 }
28}
29
30func (e *GitHubAPIError) Error() string {
31 return fmt.Errorf("%s: %w", e.Message, e.Err).Error()

Callers 3

NewGitHubAPIErrorToCtxFunction · 0.85
TestGitHubErrorTypesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGitHubErrorTypesFunction · 0.68