client: Clarify error reason when required response body is missing #258

Open
opened 2025-12-28 18:07:35 +00:00 by sami · 0 comments
Owner

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

all response payloads are transmitted in the body field. In most cases ay least one body field is required. When the body is missing in the response, client returns missing X field in the response where X is the 1st required field being checked

overall, this is correct: error returns, and field absence follows from the body absence. But these cases are different from the protobuf pov, i'd separate them from each other. This can simplify debug

Describe the solution you'd like

return errors.New("missing body in the response")

Additional context

Client testing

Originally created by @cthulhu-rider on GitHub (Dec 10, 2024). ## Is your feature request related to a problem? Please describe. all response payloads are transmitted in the body field. In most cases ay least one body field is required. When the body is missing in the response, client returns `missing X field in the response` where `X` is the 1st required field being checked overall, this is correct: error returns, and field absence follows from the body absence. But these cases are different from the protobuf pov, i'd separate them from each other. This can simplify debug ## Describe the solution you'd like ```go return errors.New("missing body in the response") ``` ## Additional context `Client` testing
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#258
No description provided.