Skip to content

Commit

Permalink
fix: improve code a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Mar 31, 2020
1 parent 7661587 commit 375109a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/client/github.go
Expand Up @@ -168,11 +168,11 @@ func (c *githubClient) Upload(
},
file,
)
if resp.StatusCode == 422 {
return err
if err == nil {
return nil
}
if err != nil {
return RetriableError{err}
if resp != nil && resp.StatusCode == 422 {
return err
}
return nil
return RetriableError{err}
}

0 comments on commit 375109a

Please sign in to comment.