(ctx context.Context, message string, resp *github.Response, err error)
| 115 | } |
| 116 | |
| 117 | func NewGitHubAPIErrorToCtx(ctx context.Context, message string, resp *github.Response, err error) (context.Context, error) { |
| 118 | apiErr := newGitHubAPIError(message, resp, err) |
| 119 | if ctx != nil { |
| 120 | _, _ = addGitHubAPIErrorToContext(ctx, apiErr) // Explicitly ignore error for graceful handling |
| 121 | } |
| 122 | return ctx, nil |
| 123 | } |
| 124 | |
| 125 | func NewGitHubGraphQLErrorToCtx(ctx context.Context, message string, err error) (context.Context, error) { |
| 126 | graphQLErr := newGitHubGraphQLError(message, err) |