types: Better bigint error
This commit is contained in:
parent
b42164f76d
commit
2e7fb42a48
@ -9,6 +9,7 @@ import (
|
||||
cbor "github.com/ipfs/go-ipld-cbor"
|
||||
"github.com/polydawn/refmt/obj/atlas"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
const BigIntMaxSerializedLen = 128 // is this big enough? or too big?
|
||||
@ -93,7 +94,7 @@ func (bi *BigInt) UnmarshalJSON(b []byte) error {
|
||||
if string(s) == "<nil>" {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("failed to parse bigint string")
|
||||
return xerrors.Errorf("failed to parse bigint string: '%s'", string(b))
|
||||
}
|
||||
|
||||
bi.Int = i
|
||||
|
Loading…
Reference in New Issue
Block a user