File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010 "time"
1111
1212 "github.com/flashbots/gh-artifacts-sync/logutils"
13+ "github.com/flashbots/gh-artifacts-sync/utils"
1314
1415 "go.uber.org/zap"
1516)
@@ -38,6 +39,9 @@ func (s *Server) downloadUrl(
3839 res , err := cli .Do (req )
3940 if err == nil && res .StatusCode != http .StatusOK {
4041 err = fmt .Errorf ("unexpected http status: %d" , res .StatusCode )
42+ if res .StatusCode == http .StatusNotFound {
43+ err = utils .DoNotRetry (err )
44+ }
4145 }
4246 if err != nil {
4347 return fmt .Errorf ("failed to execute http request: %w" , err )
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ func (s *Server) uploadFromZipToGcpArtifactRegistryDocker(
8989
9090 transportErr := & crtransport.Error {}
9191 if errors .As (uploadErr , & transportErr ) && ! transportErr .Temporary () {
92- uploadErr = utils .NoRetry (uploadErr )
92+ uploadErr = utils .DoNotRetry (uploadErr )
9393 }
9494
9595 return uploadErr
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ type NonRetryableError struct {
44 err error
55}
66
7- func NoRetry (err error ) error {
7+ func DoNotRetry (err error ) error {
88 return & NonRetryableError {err : err }
99}
1010
You can’t perform that action at this time.
0 commit comments