[#275] client: Return status from all methods #275
No reviewers
TrueCloudLab/storage-sdk-developers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#275
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-sdk-go:bugfix/client_status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since status is checked first in handleError method, it should be returned from client methods
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
3063b525d5
to1725c2ca13
[#xxx] client: Return status from all methodsto [#275] client: Return status from all methods@ -240,7 +240,7 @@ func (c *Client) NetMapSnapshot(ctx context.Context, _ PrmNetMapSnapshot) (*ResN
var res ResNetMapSnapshot
res.st, err = c.processResponse(resp)
if err != nil {
Should we use
if err != nil || !apistatus.IsSuccessful(res.st)
? Probably we need someone fromcore
teamOh, I see next line (246). So suppose we can freely use
if err != nil || !apistatus.IsSuccessful(res.st)
and drop lines 246-2481725c2ca13
to1b67ab9608
@ -162,3 +159,1 @@
if !apistatus.IsSuccessful(x.res.st) {
return &x.res, nil
if x.err != nil || !apistatus.IsSuccessful(x.res.st) {
It seems that then the errors may not be distinguished: either the error occurred by performing a request (signature check failure) or by processing of request (APE check failure while
PutObject
handling).Although, we have such an error resolution:
that doesn't seem controversial to the introduced approach