Skip to content

Commit

Permalink
Ensure failed LRO returns HTTP response (#155)
Browse files Browse the repository at this point in the history
Omit the early-exit from an LRO sender as it prevents the underlying
HTTP response from being returned to the caller (the LRO state machine
can handle the success/failure status codes).
Update test dependencies.
  • Loading branch information
jhendrixMSFT authored Oct 16, 2018
1 parent b8734b8 commit a5f3812
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 316 deletions.
4 changes: 0 additions & 4 deletions src/Templates/MethodTemplate.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ func (client @(Model.Owner)) @(Model.Name)(@Model.MethodParametersSignature) (@M
if err != nil {
return
}
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(@(string.Join(",", Model.ResponseCodes.ToArray()))))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
</text>
Expand Down
6 changes: 3 additions & 3 deletions test/src/tests/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/src/tests/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

[[constraint]]
name = "github.com/Azure/go-autorest"
version = "10.15.3"
version = "11.1.1"

[[constraint]]
name = "github.com/satori/go.uuid"
Expand Down
28 changes: 0 additions & 28 deletions test/src/tests/generated/lro/lroretrys.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a5f3812

Please sign in to comment.