RPC: Surface underlying error when failing to return a state. (#9024)

This commit is contained in:
Preston Van Loon 2021-06-11 08:50:02 -05:00 committed by GitHub
parent 71fd747dca
commit 6981b16ecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ func (bs *Server) ListValidatorBalances(
}
requestedState, err := bs.StateGen.StateBySlot(ctx, startSlot)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not get state")
return nil, status.Errorf(codes.Internal, "Could not get state: %v", err)
}
vals := requestedState.Validators()