Skip to content

Commit

Permalink
support failed precondition status (#3457)
Browse files Browse the repository at this point in the history
  • Loading branch information
idoqo authored Jan 17, 2025
1 parent 47735be commit bbc5c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion managed/services/server/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ func (up *Updater) sendRequestToWatchtower(ctx context.Context, newImageName str
}
defer resp.Body.Close() //nolint:errcheck

if resp.StatusCode == http.StatusBadRequest {
if resp.StatusCode == http.StatusBadRequest ||
resp.StatusCode == http.StatusPreconditionFailed {
bytes, err := io.ReadAll(resp.Body)
if err != nil {
return errors.Wrap(err, "failed to read response body")
Expand Down

0 comments on commit bbc5c8a

Please sign in to comment.