Skip to content

Commit d1b7784

Browse files
Use ErrUnexpectedStatus more consistently
Signed-off-by: Ilya Dmitrichenko <[email protected]>
1 parent a11d785 commit d1b7784

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

remotes/docker/pusher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Di
354354
switch resp.StatusCode {
355355
case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted:
356356
default:
357-
return errors.Errorf("unexpected status: %s", resp.Status)
357+
return remoteserrors.NewUnexpectedStatusErr(resp.Response)
358358
}
359359

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

0 commit comments

Comments
 (0)