GetGitHubGraphQLErrors retrieves the slice of GitHubGraphQLErrors from the context.
(ctx context.Context)
| 100 | |
| 101 | // GetGitHubGraphQLErrors retrieves the slice of GitHubGraphQLErrors from the context. |
| 102 | func 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. |
| 110 | func GetGitHubRawAPIErrors(ctx context.Context) ([]*GitHubRawAPIError, error) { |
no outgoing calls