[Storage] Pageable operations attempt to deserialize `204 No Content`

Open
#1,032 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
api

Research direction

Start with the mocked test referenced in the linked pull request comment and trace the generated response handling for a pageable operation returning 204. Confirm that the no-content response completes without deserialization and that the test no longer reports a deserialization error.

Written by the indexing model from the issue text.

Description

More context found in this PR comment: https://github.com/Azure/azure-sdk-for-rust/pull/5273/changes#r3973832539

But in short:

  • TypeSpec Rust emitter treats every successful (2xx) response as having a body that needs to be deserialized
  • However, 204 literally maps to No Content, meaning there is no body
  • Therefore, for a 204 it still attempts to deserializes, and since there is no body, it will actually bubble this up as some sort of deserialization error
  • I believe the correct behavior here is that 204 No Content should be explicitly handled to not attempt deserialization

The above PR comment targets a mocked test showing this attempt to deserialize on a 204 response.

Dominant language
Rust
Stars
7
Forks
11
Avg merge
14h 15m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/typespec-rust

All issues in Azure/typespec-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.