fail method
Creates a failing health check result for this indicator.
This method automatically populates name, componentId, componentType, and observedUnit from this indicator's properties.
Implementation
HealthCheckResult fail({
T? observedValue,
String? output,
DateTime? time,
}) {
return HealthCheckResult._(
name: name,
status: HealthStatus.fail,
componentId: componentId,
componentType: componentType,
observedValue: observedValue,
observedUnit: observedUnit,
output: output,
time: time ?? DateTime.now().toUtc(),
);
}