Use SDK error checkers instead of manual unwraps #268

Closed
opened 2025-12-28 17:36:48 +00:00 by sami · 3 comments
Owner

Originally created by @alexvanin on GitHub (Jun 30, 2022).

Originally assigned to: @alexvanin on GitHub.

After https://github.com/nspcc-dev/neofs-sdk-go/issues/278 we can use SDK error checkers because they are now work correctly with wrapper errors. Look for unwrap methods in the code.

Originally created by @alexvanin on GitHub (Jun 30, 2022). Originally assigned to: @alexvanin on GitHub. After https://github.com/nspcc-dev/neofs-sdk-go/issues/278 we can use SDK error checkers because they are now work correctly with wrapper errors. Look for `unwrap` methods in the code.
sami 2025-12-28 17:36:48 +00:00
Author
Owner

@cthulhu-rider commented on GitHub (Jul 4, 2022):

I've not found any place with unwrapping.

@cthulhu-rider commented on GitHub (Jul 4, 2022): I've not found any place with unwrapping.
Author
Owner

@alexvanin commented on GitHub (Jul 4, 2022):

Relevant for tree-service branch after rebase.

@alexvanin commented on GitHub (Jul 4, 2022): Relevant for tree-service branch after rebase.
Author
Owner

@alexvanin commented on GitHub (Jul 27, 2022):

The only place where unwrap is being used is here (v0.22.0): nspcc-dev/neofs-s3-gw@5dd658302d/internal/neofs/neofs.go (L473-L488)

I think it is appropriate to keep unwrapping, because gate wants a reason, so type casting is mandatory.
I don't have any good ideas how to organize error type casting on a SDK level.

@alexvanin commented on GitHub (Jul 27, 2022): The only place where unwrap is being used is here (v0.22.0): https://github.com/nspcc-dev/neofs-s3-gw/blob/5dd658302da76c4f10a81fe989e3a0f75814bb57/internal/neofs/neofs.go#L473-L488 I think it is appropriate to keep unwrapping, because gate wants a reason, so type casting is mandatory. I don't have any good ideas how to organize error type casting on a SDK level.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-s3-gw#268
No description provided.