From 72e62efc76fd4d69d376ea244a409261b6983edc Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 21 Nov 2019 14:51:25 +0100 Subject: [PATCH] common/hexutil: improve GraphQL error messages (#20353) --- common/hexutil/json.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/hexutil/json.go b/common/hexutil/json.go index 777b08eca42a..50db208118ee 100644 --- a/common/hexutil/json.go +++ b/common/hexutil/json.go @@ -86,7 +86,7 @@ func (b *Bytes) UnmarshalGraphQL(input interface{}) error { } *b = data default: - err = fmt.Errorf("Unexpected type for Bytes: %v", input) + err = fmt.Errorf("unexpected type %T for Bytes", input) } return err } @@ -220,7 +220,7 @@ func (b *Big) UnmarshalGraphQL(input interface{}) error { num.SetInt64(int64(input)) *b = Big(num) default: - err = fmt.Errorf("Unexpected type for BigInt: %v", input) + err = fmt.Errorf("unexpected type %T for BigInt", input) } return err } @@ -284,7 +284,7 @@ func (b *Uint64) UnmarshalGraphQL(input interface{}) error { case int32: *b = Uint64(input) default: - err = fmt.Errorf("Unexpected type for Long: %v", input) + err = fmt.Errorf("unexpected type %T for Long", input) } return err }