We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c92a83 commit 8d28e82Copy full SHA for 8d28e82
src/AzureFunctions.PowerShell.Durable.SDK.psm1
@@ -142,6 +142,12 @@ function Get-TraceHeaders {
142
return @{} # Return an empty headers object
143
}
144
145
+ # Check if Get-CurrentActivityForInvocation is available
146
+ if (-not (Get-Command -Name Get-CurrentActivityForInvocation -ErrorAction SilentlyContinue)) {
147
+ Write-Warning "Get-CurrentActivityForInvocation is not available. Skipping call."
148
+ return @{} # Return an empty headers object
149
+ }
150
+
151
$activityResponse = Get-CurrentActivityForInvocation -InvocationId $invocationId
152
$activity = $activityResponse.activity
153
0 commit comments