Skip to content

[Issue] - Health Checker false information provided in report due to an exception #1885

@dpaulson45

Description

@dpaulson45

Describe the issue
When doing some work on HC, found a bug that we need to address.

image

In the middle of the analyzer code, we run into an unhandled exception that is then caught stating we Failed to Health Checker against Solo-E19A which shouldn't be in the middle of the report. This exception is intended for only the collection of the data.

Expected behavior
This exception should only occur in the data collection, not the report. Need to adjust the code in Get-HealthCheckerData.

Should also determine the bug in the column output code, as that appears to be where this exception is coming from.

 : Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
Inner Exception:    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()
Position Message: At C:\Users\Han\Desktop\HealthChecker.ps1:8535 char:94
+ ... -1 * ($colWidths[$i] + $padding))}" -f $lineObj."$($props[$i])") -NoN ...
+                                                        ~~~~~~~~~~
Script Stack: at Out-Columns<End>, C:\Users\Han\Desktop\HealthChecker.ps1: line 8535
at Write-OutColumns, C:\Users\Han\Desktop\HealthChecker.ps1: line 8597
at Write-ResultsToScreen, C:\Users\Han\Desktop\HealthChecker.ps1: line 8255
at Get-HealthCheckerData, C:\Users\Han\Desktop\HealthChecker.ps1: line 14635
at Invoke-HealthCheckerMainReport, C:\Users\Han\Desktop\HealthChecker.ps1: line 14704
at <ScriptBlock><End>, C:\Users\Han\Desktop\HealthChecker.ps1: line 15515
at <ScriptBlock>, <No file>: line 1
-----------------------------------

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions