diff --git a/rpc/messages.go b/rpc/messages.go
index 7f5ebab11b58ee68a18dc4cf64d431dc47336173..5c498234f9fb36c2adaebe39e8d0ff732286a897 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -21,6 +21,22 @@ import (
 	"fmt"
 )
 
+type InvalidTypeError struct {
+	method string
+	msg    string
+}
+
+func (e *InvalidTypeError) Error() string {
+	return fmt.Sprintf("invalid type on field %s: %s", e.method, e.msg)
+}
+
+func NewInvalidTypeError(method, msg string) *InvalidTypeError {
+	return &InvalidTypeError{
+		method: method,
+		msg:    msg,
+	}
+}
+
 type InsufficientParamsError struct {
 	have int
 	want int
diff --git a/rpc/messages_test.go b/rpc/messages_test.go
index 5274c91e4249a4ff16d25b57d65f04c6425435ee..91f0152dc8227aa1081b716c7f3c49da2ca9e850 100644
--- a/rpc/messages_test.go
+++ b/rpc/messages_test.go
@@ -4,6 +4,15 @@ import (
 	"testing"
 )
 
+func TestInvalidTypeError(t *testing.T) {
+	err := NewInvalidTypeError("testField", "not string")
+	expected := "invalid type on field testField: not string"
+
+	if err.Error() != expected {
+		t.Error(err.Error())
+	}
+}
+
 func TestInsufficientParamsError(t *testing.T) {
 	err := NewInsufficientParamsError(0, 1)
 	expected := "insufficient params, want 1 have 0"