Skip to content

Commit 72e62ef

Browse files
fjlkaralabe
authored andcommitted
common/hexutil: improve GraphQL error messages (ethereum#20353)
1 parent f56f969 commit 72e62ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/hexutil/json.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (b *Bytes) UnmarshalGraphQL(input interface{}) error {
8686
}
8787
*b = data
8888
default:
89-
err = fmt.Errorf("Unexpected type for Bytes: %v", input)
89+
err = fmt.Errorf("unexpected type %T for Bytes", input)
9090
}
9191
return err
9292
}
@@ -220,7 +220,7 @@ func (b *Big) UnmarshalGraphQL(input interface{}) error {
220220
num.SetInt64(int64(input))
221221
*b = Big(num)
222222
default:
223-
err = fmt.Errorf("Unexpected type for BigInt: %v", input)
223+
err = fmt.Errorf("unexpected type %T for BigInt", input)
224224
}
225225
return err
226226
}
@@ -284,7 +284,7 @@ func (b *Uint64) UnmarshalGraphQL(input interface{}) error {
284284
case int32:
285285
*b = Uint64(input)
286286
default:
287-
err = fmt.Errorf("Unexpected type for Long: %v", input)
287+
err = fmt.Errorf("unexpected type %T for Long", input)
288288
}
289289
return err
290290
}

0 commit comments

Comments
 (0)