client: Status responses with unknown code are not apistatus.Error #244

Open
opened 2025-12-28 18:07:33 +00:00 by sami · 1 comment
Owner

Originally created by @cthulhu-rider on GitHub (Dec 5, 2024).

any non-zero status sent by the server must be apistatus.Error. But currently https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/client/status#UnrecognizedStatusV2 is not. I find this incorrect

maybe

Steps to Reproduce

func TestUnrecognizedStatus(t *testing.T) {
	require.ErrorIs(t, apistatus.ErrUnrecognizedStatusV2, apistatus.Error)
}

Current Behavior

FAIL

Expected Behavior

PASS

Possible Solution

make it work

Context

Client testing

Regression

no, it is so from the apistatus.Error appearance fc0bd12101. Mb @smallhive will remind why

Your Environment

Originally created by @cthulhu-rider on GitHub (Dec 5, 2024). any non-zero status sent by the server must be [`apistatus.Error`](https://github.com/nspcc-dev/neofs-sdk-go/blob/v1.0.0-rc.12/client/status/common.go#L12). But currently https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/client/status#UnrecognizedStatusV2 is not. I find this incorrect maybe ## Steps to Reproduce ```go func TestUnrecognizedStatus(t *testing.T) { require.ErrorIs(t, apistatus.ErrUnrecognizedStatusV2, apistatus.Error) } ``` ## Current Behavior FAIL ## Expected Behavior PASS ## Possible Solution make it work ## Context `Client` testing ## Regression no, it is so from the `apistatus.Error` appearance fc0bd12101f8e4ed34191229667c90d701cdf385. Mb @smallhive will remind why ## Your Environment * Version of the product used: [`335d9fe90f24494944c2888ef385f06f5f81dcfc`](https://github.com/nspcc-dev/neofs-sdk-go/tree/335d9fe90f24494944c2888ef385f06f5f81dcfc)
Author
Owner

@roman-khimov commented on GitHub (Dec 5, 2024):

I don't think there is any real reason for that, just an omission.

@roman-khimov commented on GitHub (Dec 5, 2024): I don't think there is any real reason for that, just an omission.
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-sdk-go#244
No description provided.