Skip to content

Commit

Permalink
Merge pull request #426 from kairu-ms/handle-204-response
Browse files Browse the repository at this point in the history
Handle 204 response
  • Loading branch information
kairu-ms authored Nov 18, 2024
2 parents 1c541c0 + 9301c83 commit d7b5b31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/aaz_dev/command/model/configuration/_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def generate_outputs(self, ref_outputs=None, pageable=None):
op_output = self.build_output_by_operation(op, pageable, client_flatten)
if op_output:
output = op_output

if output and ref_outputs:
assert len(ref_outputs) == 1, "Only support one reference output"
ref_output = ref_outputs[0]
Expand All @@ -132,6 +131,9 @@ def build_output_by_operation(cls, op, pageable=None, client_flatten=True):
if resp.is_error:
continue
if resp.body is None:
if 204 in resp.status_codes and op.http.request.method == "delete":
# no content response for delete operation
return None
continue
if isinstance(resp.body, CMDHttpResponseJsonBody):
body_json = resp.body.json
Expand Down

0 comments on commit d7b5b31

Please sign in to comment.