(ctx context.Context, err *GitHubGraphQLError)
| 139 | } |
| 140 | |
| 141 | func addGitHubGraphQLErrorToContext(ctx context.Context, err *GitHubGraphQLError) (context.Context, error) { |
| 142 | if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok { |
| 143 | val.graphQL = append(val.graphQL, err) // append the error to the existing slice in the context |
| 144 | return ctx, nil |
| 145 | } |
| 146 | return nil, fmt.Errorf("context does not contain GitHubCtxErrors") |
| 147 | } |
| 148 | |
| 149 | func addRawAPIErrorToContext(ctx context.Context, err *GitHubRawAPIError) (context.Context, error) { |
| 150 | if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok { |
no outgoing calls