Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

restJson error deserialization fails on empty body #4811

Closed
lucix-aws opened this issue Apr 24, 2023 · 1 comment · Fixed by #4817
Closed

restJson error deserialization fails on empty body #4811

lucix-aws opened this issue Apr 24, 2023 · 1 comment · Fixed by #4817
Assignees
Labels
bug This issue is a bug. pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@lucix-aws
Copy link
Contributor

lucix-aws commented Apr 24, 2023

Describe the bug

Uncovered by #4740.

In scenarios where restjson error deserialization falls back to inspect the body, the SDK has always failed if the body is empty.

Before the above change, this code path would have only been hit when the error response did NOT contain the code as a header. Post-change, it is now hit when the headers are also missing the message.

We should consider this error message purely optional, the only value needed to deserialize to the appropriate type is the code.

Expected Behavior

deserialized error

Current Behavior

unmarshal error

Reproduction Steps

n/a

Possible Solution

No response

Additional Information/Context

No response

SDK version used

latest

Environment details (Version of Go (go version)? OS name and version, etc.)

n/a

@lucix-aws lucix-aws added the bug This issue is a bug. label Apr 24, 2023
@lucix-aws lucix-aws self-assigned this Apr 24, 2023
@lucix-aws lucix-aws changed the title restJson error deserialization fails on missing optional json fields restJson error deserialization fails on empty bod Apr 27, 2023
@lucix-aws lucix-aws changed the title restJson error deserialization fails on empty bod yrestJson error deserialization fails on empty bod Apr 27, 2023
@lucix-aws lucix-aws changed the title yrestJson error deserialization fails on empty bod restJson error deserialization fails on empty body Apr 27, 2023
@RanVaknin RanVaknin added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Apr 28, 2023
@github-actions
Copy link

github-actions bot commented May 8, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug This issue is a bug. pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants