From 9d208e165b3b280f63385f3e686a9367b5942c09 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Tue, 5 May 2020 12:54:03 -0400 Subject: [PATCH] bump error codes (#279) --- types/errors.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/errors.go b/types/errors.go index a968cff5..b36a1b5f 100644 --- a/types/errors.go +++ b/types/errors.go @@ -9,13 +9,15 @@ const ( RootCodespace = "ethermint" ) +// NOTE: We can't use 1 since that error code is reserved for internal errors. + var ( // ErrInvalidValue returns an error resulting from an invalid value. - ErrInvalidValue = sdkerrors.Register(RootCodespace, 1, "invalid value") + ErrInvalidValue = sdkerrors.Register(RootCodespace, 2, "invalid value") // ErrInvalidChainID returns an error resulting from an invalid chain ID. - ErrInvalidChainID = sdkerrors.Register(RootCodespace, 2, "invalid chain ID") + ErrInvalidChainID = sdkerrors.Register(RootCodespace, 3, "invalid chain ID") // ErrVMExecution returns an error resulting from an error in EVM execution. - ErrVMExecution = sdkerrors.Register(RootCodespace, 3, "error while executing evm transaction") + ErrVMExecution = sdkerrors.Register(RootCodespace, 4, "error while executing evm transaction") )