forked from cerc-io/plugeth
core, eth, les, rpc: polish catalyst errors, add context
This commit is contained in:
@@ -54,7 +54,6 @@ var (
|
||||
_ Error = new(invalidRequestError)
|
||||
_ Error = new(invalidMessageError)
|
||||
_ Error = new(invalidParamsError)
|
||||
_ Error = new(CustomError)
|
||||
)
|
||||
|
||||
const defaultErrorCode = -32000
|
||||
@@ -102,12 +101,3 @@ type invalidParamsError struct{ message string }
|
||||
func (e *invalidParamsError) ErrorCode() int { return -32602 }
|
||||
|
||||
func (e *invalidParamsError) Error() string { return e.message }
|
||||
|
||||
type CustomError struct {
|
||||
Code int
|
||||
ValidationError string
|
||||
}
|
||||
|
||||
func (e *CustomError) ErrorCode() int { return e.Code }
|
||||
|
||||
func (e *CustomError) Error() string { return e.ValidationError }
|
||||
|
||||
Reference in New Issue
Block a user