mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
More Useful Log When Auth Fails to Execution Client (#10609)
* more helpful auth message when auth to engine does not work * better language * clarity * check for 401 * fix panic Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
55883876e4
commit
5315c45453
@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
@ -287,6 +288,13 @@ func handleRPCError(err error) error {
|
||||
}
|
||||
e, ok := err.(rpc.Error)
|
||||
if !ok {
|
||||
if strings.Contains(err.Error(), "401 Unauthorized") {
|
||||
log.Error("HTTP authentication to your execution client is not working. Please ensure " +
|
||||
"you are setting a correct value for the --jwt-secret flag in Prysm, or use an IPC connection if on " +
|
||||
"the same machine. Please see our documentation for more information on authenticating connections " +
|
||||
"here https://docs.prylabs.network/docs/execution-node/authentication")
|
||||
return fmt.Errorf("could not authenticate connection to execution client: %v", err)
|
||||
}
|
||||
return errors.Wrap(err, "got an unexpected error")
|
||||
}
|
||||
switch e.ErrorCode() {
|
||||
|
Loading…
Reference in New Issue
Block a user