Skip to content

Commit

Permalink
Use ErrUnexpectedStatus more consistently
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
  • Loading branch information
errordeveloper committed Mar 11, 2021
1 parent a11d785 commit d1b7784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remotes/docker/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Di
switch resp.StatusCode {
case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted:
default:
return errors.Errorf("unexpected status: %s", resp.Status)
return remoteserrors.NewUnexpectedStatusErr(resp.Response)
}

status, err := pw.tracker.GetStatus(pw.ref)
Expand Down

0 comments on commit d1b7784

Please sign in to comment.