(ctx context.Context, message string, err error)
| 123 | } |
| 124 | |
| 125 | func 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 | |
| 133 | func addGitHubAPIErrorToContext(ctx context.Context, err *GitHubAPIError) (context.Context, error) { |
| 134 | if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok { |
nothing calls this directly
no test coverage detected