mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
beacon/engine: return formatted engine api error message and internal error in EngineAPIError.Error method
This commit is contained in:
parent
368e16f39d
commit
07fb925ac6
1 changed files with 2 additions and 1 deletions
|
|
@ -17,6 +17,7 @@
|
|||
package engine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
)
|
||||
|
|
@ -30,7 +31,7 @@ type EngineAPIError struct {
|
|||
}
|
||||
|
||||
func (e *EngineAPIError) ErrorCode() int { return e.code }
|
||||
func (e *EngineAPIError) Error() string { return e.msg }
|
||||
func (e *EngineAPIError) Error() string { return fmt.Sprintf("msg: \"%s\". err: \"%w\"", e.msg, e.err) }
|
||||
func (e *EngineAPIError) ErrorData() interface{} {
|
||||
if e.err == nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue