panic to error changes and changelog (#15074)

This commit is contained in:
james-prysm
2025-03-19 09:31:29 -05:00
committed by GitHub
parent 179cedd4a0
commit 08bfaca42d
2 changed files with 6 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
### Ignored
- switched panics for thrown errors in NewBeaconApiChainClientWithFallback functions

View File

@@ -312,7 +312,7 @@ func (c beaconApiChainClient) ValidatorQueue(ctx context.Context, in *empty.Empt
}
// TODO: Implement me
panic("beaconApiChainClient.ValidatorQueue is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
return nil, errors.New("beaconApiChainClient.ValidatorQueue is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
}
func (c beaconApiChainClient) ValidatorPerformance(ctx context.Context, in *ethpb.ValidatorPerformanceRequest) (*ethpb.ValidatorPerformanceResponse, error) {
@@ -321,7 +321,7 @@ func (c beaconApiChainClient) ValidatorPerformance(ctx context.Context, in *ethp
}
// TODO: Implement me
panic("beaconApiChainClient.ValidatorPerformance is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
return nil, errors.New("beaconApiChainClient.ValidatorPerformance is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
}
func (c beaconApiChainClient) ValidatorParticipation(ctx context.Context, in *ethpb.GetValidatorParticipationRequest) (*ethpb.ValidatorParticipationResponse, error) {
@@ -330,7 +330,7 @@ func (c beaconApiChainClient) ValidatorParticipation(ctx context.Context, in *et
}
// TODO: Implement me
panic("beaconApiChainClient.ValidatorParticipation is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
return nil, errors.New("beaconApiChainClient.ValidatorParticipation is not implemented. To use a fallback client, pass a fallback client as the last argument of NewBeaconApiChainClientWithFallback.")
}
func NewBeaconApiChainClientWithFallback(jsonRestHandler JsonRestHandler, fallbackClient iface.ChainClient) iface.ChainClient {