Skip to content

Commit

Permalink
Update output for REST methods (#736)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Watherston <[email protected]>
  • Loading branch information
anwather and Anthony Watherston authored Aug 27, 2024
1 parent b8030bb commit cd8e471
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ function Set-AzPolicyAssignmentRestMethod {
if ($statusCode -ge 300 -or $statusCode -lt 200) {
$content = $response.Content
Write-Information "assignment: $assignmentJson"
Write-Error "Assignment error $($statusCode) -- $($content)" -ErrorAction Stop
Write-Error "Definition error $($statusCode) -- $($AssignmentObj.displayName) --$($content)" -ErrorAction Stop
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ function Set-AzPolicyDefinitionRestMethod {
$statusCode = $response.StatusCode
if ($statusCode -lt 200 -or $statusCode -ge 300) {
$content = $response.Content
Write-Error "Policy definition error $($statusCode) -- $($content)" -ErrorAction Stop
Write-Error "Definition error $($statusCode) -- $($DefinitionObj.displayName) --$($content)" -ErrorAction Stop
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ function Set-AzPolicySetDefinitionRestMethod {
$statusCode = $response.StatusCode
if ($statusCode -lt 200 -or $statusCode -ge 300) {
$content = $response.Content
Write-Error "definition error $($statusCode) -- $($content)" -ErrorAction Stop
Write-Error "Definition error $($statusCode) -- $($DefinitionObj.displayName) --$($content)" -ErrorAction Stop
}
}

0 comments on commit cd8e471

Please sign in to comment.