Skip to content

Commit

Permalink
allow azure-async-op polling on 202 (Azure#13852)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Aug 7, 2020
1 parent 042d526 commit f479be5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sdk/core/azure-core-management/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Added `getResponseHeaders()` method to `PollResult.Error` class.
- Added `AzureProfile` class.
- Added `IdentifierProvider` and `DelayProvider` interfaces.
- Fixed polling status HTTP status code check to include `202`.

## 1.0.0-beta.2 (2020-07-09)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void update(int pollResponseStatusCode,
HttpHeaders pollResponseHeaders,
String pollResponseBody,
SerializerAdapter adapter) {
if (pollResponseStatusCode != 200) {
if (pollResponseStatusCode != 200 && pollResponseStatusCode != 201 && pollResponseStatusCode != 202) {
this.provisioningState = ProvisioningState.FAILED;
this.pollError = new Error("Polling failed with status code:" + pollResponseStatusCode,
pollResponseStatusCode,
Expand Down

0 comments on commit f479be5

Please sign in to comment.