Skip to content

Commit

Permalink
Include error check on ghErr check for retries
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-jokic committed Dec 27, 2024
1 parent cb2679c commit b848ff9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/handler/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package handler

import (
"context"
"errors"
"os"
"time"

Expand Down Expand Up @@ -49,7 +50,8 @@ func (cf *ConfigFetcher) ConfigForRepositoryBranch(ctx context.Context, client *
}

if err != nil {
if !os.IsTimeout(err) {
var ghErr *github.ErrorResponse
if !os.IsTimeout(err) && !errors.As(err, &ghErr) && ghErr.Response.StatusCode != 500 {
fc.LoadError = err
return fc
}
Expand Down

0 comments on commit b848ff9

Please sign in to comment.