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 b53f588 commit ed70a0bCopy full SHA for ed70a0b
packages/grpc-js/src/load-balancer-outlier-detection.ts
@@ -113,7 +113,7 @@ export class OutlierDetectionLoadBalancingConfig implements LoadBalancingConfig
113
failurePercentageEjection: Partial<FailurePercentageEjectionConfig> | null,
114
private readonly childPolicy: LoadBalancingConfig[]
115
) {
116
- if (childPolicy[0].getLoadBalancerName() === 'pick_first') {
+ if (childPolicy.length > 0 && childPolicy[0].getLoadBalancerName() === 'pick_first') {
117
throw new Error('outlier_detection LB policy cannot have a pick_first child policy');
118
}
119
this.intervalMs = intervalMs ?? 10_000;
0 commit comments