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

Function NewGitHubGraphQLErrorToCtx

pkg/errors/error.go:125–131  ·  view source on GitHub ↗
(ctx context.Context, message string, err error)

Source from the content-addressed store, hash-verified

123}
124
125func NewGitHubGraphQLErrorToCtx(ctx context.Context, message string, err error) (context.Context, error) {
126 graphQLErr := newGitHubGraphQLError(message, err)
127 if ctx != nil {
128 _, _ = addGitHubGraphQLErrorToContext(ctx, graphQLErr) // Explicitly ignore error for graceful handling
129 }
130 return ctx, nil
131}
132
133func addGitHubAPIErrorToContext(ctx context.Context, err *GitHubAPIError) (context.Context, error) {
134 if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok {

Callers

nothing calls this directly

Calls 2

newGitHubGraphQLErrorFunction · 0.85

Tested by

no test coverage detected