forked from TrueCloudLab/frostfs-sdk-go
[#140] apistatus: Support OBJECT_NOT_FOUND
error
Define `ObjectNotFound` type for `OBJECT_NOT_FOUND` code. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3e94b7c892
commit
ff3826ae6b
3 changed files with 44 additions and 0 deletions
|
@ -81,6 +81,12 @@ func TestToStatusV2(t *testing.T) {
|
|||
}),
|
||||
codeV2: 2048,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.ObjectNotFound)
|
||||
}),
|
||||
codeV2: 2049,
|
||||
},
|
||||
} {
|
||||
var st apistatus.Status
|
||||
|
||||
|
@ -181,6 +187,12 @@ func TestFromStatusV2(t *testing.T) {
|
|||
}),
|
||||
codeV2: 2048,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.ObjectNotFound)
|
||||
}),
|
||||
codeV2: 2049,
|
||||
},
|
||||
} {
|
||||
var st apistatus.Status
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue