forked from TrueCloudLab/frostfs-node
[#1247] object: Return NOT_FOUND
and ALREADY_REMOVED
statuses
Replace `ErrNotFound`/`ErrAlreadyRemoved` error from `pkg/core/object` package with `ObjectNotFound`/`ObjectAlreadyRemoved` one from `apistatus` package. These errors are returned by storage node's server as NeoFS API statuses. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f32c9670ad
commit
70ffdf3478
49 changed files with 348 additions and 178 deletions
|
@ -36,6 +36,8 @@ func (p *PutPrm) WithObject(obj *objectSDK.Object) *PutPrm {
|
|||
// did not allow to completely save the object.
|
||||
//
|
||||
// Returns an error if executions are blocked (see BlockExecution).
|
||||
//
|
||||
// Returns apistatus.ObjectAlreadyRemoved if object has been marked as removed.
|
||||
func (e *StorageEngine) Put(prm *PutPrm) (res *PutRes, err error) {
|
||||
err = e.execIfNotBlocked(func() error {
|
||||
res, err = e.put(prm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue