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

Function GetGitHubGraphQLErrors

pkg/errors/error.go:102–107  ·  view source on GitHub ↗

GetGitHubGraphQLErrors retrieves the slice of GitHubGraphQLErrors from the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

100
101// GetGitHubGraphQLErrors retrieves the slice of GitHubGraphQLErrors from the context.
102func GetGitHubGraphQLErrors(ctx context.Context) ([]*GitHubGraphQLError, error) {
103 if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok {
104 return val.graphQL, nil // return the slice of GraphQL errors from the context
105 }
106 return nil, fmt.Errorf("context does not contain GitHubCtxErrors")
107}
108
109// GetGitHubRawAPIErrors retrieves the slice of GitHubRawAPIErrors from the context.
110func GetGitHubRawAPIErrors(ctx context.Context) ([]*GitHubRawAPIError, error) {

Callers 2

TestGitHubErrorContextFunction · 0.85
TestMiddlewareScenarioFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestGitHubErrorContextFunction · 0.68
TestMiddlewareScenarioFunction · 0.68