liquidity icon indicating copy to clipboard operation
liquidity copied to clipboard

sentinel error code

Open jhernandezb opened this issue 4 years ago • 4 comments

Summary of Bug

Sentinel errors must not start at 1 since this is reserved code.

See https://github.com/cosmos/cosmos-sdk/issues/9598

Version

Steps to Reproduce


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

jhernandezb avatar Jun 29 '21 15:06 jhernandezb

Good point. Thanks for brining it up.

  1. Must be greater than one, as a code value of one is reserved for internal errors.
  2. Must be unique within the module.

jaybxyz avatar Jun 30 '21 02:06 jaybxyz

Would that mean just bumping everything up in the types/errors.go

lukerhoads avatar Jul 06 '21 23:07 lukerhoads

This is something that needs to be fixed in the next version. We can bump the error code 1 instead of bumping everything up to minimize issues on client side.

jaybxyz avatar Jul 07 '21 01:07 jaybxyz

Ahh yes much more efficient 💯

lukerhoads avatar Jul 07 '21 02:07 lukerhoads