Skip to content

Commit

Permalink
core: do not override error in case of remote metadata mismatch
Browse files Browse the repository at this point in the history
Signed-off-by: Janusz Marcinkiewicz <[email protected]>
  • Loading branch information
VirrageS committed Jan 9, 2025
1 parent 2de62d8 commit 3084be5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/ldp.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,10 @@ func (lom *LOM) CheckRemoteMD(locked, sync bool, origReq *http.Request) (res CRM
// it as if the object doesn't really exist.
err = cmn.NewErrRemoteMetadataMismatch(e)
ecode = http.StatusNotFound
}

if ecode == http.StatusNotFound {
} else if ecode == http.StatusNotFound {
err = cos.NewErrNotFound(T, lom.Cname())
}

if !locked {
// return info (neq and, possibly, not-found), and be done
return CRMD{ErrCode: ecode, Err: err}
Expand Down

0 comments on commit 3084be5

Please sign in to comment.