(ctx context.Context, err error)
| 630 | } |
| 631 | |
| 632 | func (c *Client) handleRequestError(ctx context.Context, err error) (error, error) { |
| 633 | if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) || ctx.Err() != nil { |
| 634 | return nil, fmt.Errorf("github: request failed: %w", err) |
| 635 | } |
| 636 | return fmt.Errorf("github: request failed: %w", err), nil |
| 637 | } |
| 638 | |
| 639 | func (c *Client) waitForRetry(ctx context.Context, backoff time.Duration) (time.Duration, error) { |
| 640 | if err := c.sleep(ctx, backoff); err != nil { |