Skip to content

Commit 67dfbc5

Browse files
committed
Replace Write-Message with Write-Error to ensure a error reporting across the deployment pipeline functions
1 parent 359180a commit 67dfbc5

9 files changed

+9
-9
lines changed

source/Public/Deployment Pipeline/Add-FabricWorkspaceToStage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ function Add-FabricWorkspaceToStage {
8282
} catch {
8383
# Step 6: Error handling
8484
$errorDetails = $_.Exception.Message
85-
Write-Message -Message "Failed to assign workspace to deployment pipeline stage. Error: $errorDetails" -Level Error
85+
Write-Error -Message "Failed to assign workspace to deployment pipeline stage. Error: $errorDetails"
8686
}
8787
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipeline.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,6 @@ function Get-FabricDeploymentPipeline {
136136
} catch {
137137
# Step 8: Error handling
138138
$errorDetails = $_.Exception.Message
139-
Write-Message -Message "Failed to retrieve deployment pipelines. Error: $errorDetails" -Level Error
139+
Write-Error -Message "Failed to retrieve deployment pipelines. Error: $errorDetails"
140140
}
141141
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineOperation.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ function Get-FabricDeploymentPipelineOperation {
6565
} catch {
6666
# Step 6: Error handling
6767
$errorDetails = $_.Exception.Message
68-
Write-Message -Message "Failed to retrieve deployment pipeline operation. Error: $errorDetails" -Level Error
68+
Write-Error -Message "Failed to retrieve deployment pipeline operation. Error: $errorDetails"
6969
}
7070
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineRoleAssignments.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ function Get-FabricDeploymentPipelineRoleAssignments {
7373
} catch {
7474
# Step 8: Error handling
7575
$errorDetails = $_.Exception.Message
76-
Write-Message -Message "Failed to get deployment pipeline role assignments. Error: $errorDetails" -Level Error
76+
Write-Error -Message "Failed to get deployment pipeline role assignments. Error: $errorDetails"
7777
}
7878
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ function Get-FabricDeploymentPipelineStage {
7474
} catch {
7575
# Step 6: Error handling
7676
$errorDetails = $_.Exception.Message
77-
Write-Message -Message "Failed to retrieve deployment pipeline stage(s). Error: $errorDetails" -Level Error
77+
Write-Error -Message "Failed to retrieve deployment pipeline stage(s). Error: $errorDetails"
7878
}
7979
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStageItem.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ function Get-FabricDeploymentPipelineStageItem {
8585
} catch {
8686
# Step 8: Error handling
8787
$errorDetails = $_.Exception.Message
88-
Write-Message -Message "Failed to retrieve deployment pipeline stage items. Error: $errorDetails" -Level Error
88+
Write-Error -Message "Failed to retrieve deployment pipeline stage items. Error: $errorDetails"
8989
}
9090
}

source/Public/Deployment Pipeline/Remove-FabricDeploymentPipeline.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ function Remove-FabricDeploymentPipeline {
5858
} catch {
5959
# Step 5: Error handling
6060
$errorDetails = $_.Exception.Message
61-
Write-Message -Message "Failed to delete deployment pipeline. Error: $errorDetails" -Level Error
61+
Write-Error -Message "Failed to delete deployment pipeline. Error: $errorDetails"
6262
}
6363
}

source/Public/Deployment Pipeline/Remove-FabricWorkspaceFromStage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ function Remove-FabricWorkspaceFromStage {
6767
} catch {
6868
# Step 5: Error handling
6969
$errorDetails = $_.Exception.Message
70-
Write-Message -Message "Failed to unassign workspace from deployment pipeline stage. Error: $errorDetails" -Level Error
70+
Write-Error -Message "Failed to unassign workspace from deployment pipeline stage. Error: $errorDetails"
7171
}
7272
}

source/Public/Deployment Pipeline/Start-FabricDeploymentPipelineStage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ function Start-FabricDeploymentPipelineStage {
133133
} catch {
134134
# Step 6: Error handling
135135
$errorDetails = $_.Exception.Message
136-
Write-Message -Message "Failed to initiate deployment. Error: $errorDetails" -Level Error
136+
Write-Error -Message "Failed to initiate deployment. Error: $errorDetails"
137137
}
138138
}

0 commit comments

Comments
 (0)