Skip to content

Commit 87eb3c9

Browse files
{Synapse} Fixed issue for "Start-AzSynapseTrigger/Stop-AzSynapseTrigger" to not throw exception when Request Status is 202 (#21839)
1 parent 91ade19 commit 87eb3c9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Synapse/Synapse/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
## Upcoming Release
2222
* Remove the unnecessary breaking change of parameter '-SparkConfigFilePath' for `New-AzSynapseSparkPool` and `Update-AzSynapseSparkPool` cmdlets
23+
* Fixed the issue for "Start-AzSynapseTrigger/Stop-AzSynapseTrigger" to not throw exception when Request Status is 202
2324

2425
## Version 2.3.1
2526
* Updated Azure.Core to 1.31.0.

src/Synapse/Synapse/Common/Utils.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2222
using Microsoft.Azure.Management.Synapse.Models;
2323
using Microsoft.Rest.Azure;
24+
using Newtonsoft.Json;
2425
using System;
2526
using System.Collections;
2627
using System.Collections.Generic;
@@ -238,8 +239,10 @@ public static Response Poll(this Operation operation)
238239
{
239240
var result = operation.WaitForCompletionResponseAsync().Result;
240241
var responseContent = result.Content;
241-
if (responseContent?.ToString().IsEmptyOrWhiteSpace() == false)
242+
243+
if (responseContent?.ToString() != "{}" && responseContent?.ToString().IsEmptyOrWhiteSpace() == false)
242244
{
245+
243246
throw new Exception(responseContent?.ToString());
244247
}
245248
return result;

0 commit comments

Comments
 (0)