Skip to content

Commit 4865ed8

Browse files
authored
Fixing null ref while logging n AzureServiceClient (#9578)
1 parent 847506a commit 4865ed8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Tasks/AzureResourceGroupDeploymentV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"version": {
1616
"Major": 2,
1717
"Minor": 147,
18-
"Patch": 1
18+
"Patch": 2
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "2.119.1",

Tasks/AzureResourceGroupDeploymentV2/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"version": {
1616
"Major": 2,
1717
"Minor": 147,
18-
"Patch": 1
18+
"Patch": 2
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "2.119.1",

Tasks/Common/azure-arm-rest/AzureServiceClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ export class ServiceClient {
162162
response = await this.beginRequest(request);
163163
tl.debug(`Response status code : ${response.statusCode}`);
164164
if (response.statusCode === 202 || (response.body && (response.body.status == "Accepted" || response.body.status == "Running" || response.body.status == "InProgress"))) {
165-
tl.debug(`Response status : ${response.body.status}`);
165+
if(response.body && response.body.status) {
166+
tl.debug(`Response status : ${response.body.status}`);
167+
}
166168
// If timeout; throw;
167169
if (!waitIndefinitely && timeout < new Date().getTime()) {
168170
throw new Error(tl.loc("TimeoutWhileWaiting"));

0 commit comments

Comments
 (0)