common/hexutil: improve GraphQL error messages (#20353)
This commit is contained in:
parent
f56f969dd3
commit
72e62efc76
@ -86,7 +86,7 @@ func (b *Bytes) UnmarshalGraphQL(input interface{}) error {
|
|||||||
}
|
}
|
||||||
*b = data
|
*b = data
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unexpected type for Bytes: %v", input)
|
err = fmt.Errorf("unexpected type %T for Bytes", input)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ func (b *Big) UnmarshalGraphQL(input interface{}) error {
|
|||||||
num.SetInt64(int64(input))
|
num.SetInt64(int64(input))
|
||||||
*b = Big(num)
|
*b = Big(num)
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unexpected type for BigInt: %v", input)
|
err = fmt.Errorf("unexpected type %T for BigInt", input)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ func (b *Uint64) UnmarshalGraphQL(input interface{}) error {
|
|||||||
case int32:
|
case int32:
|
||||||
*b = Uint64(input)
|
*b = Uint64(input)
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unexpected type for Long: %v", input)
|
err = fmt.Errorf("unexpected type %T for Long", input)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user