CosmWasm/cosmwasm-go

Building errors (we can't use `fmt.Errorf`)

Opened this issue · 0 comments

iTiky commented

Since we can't use fmt.Errorf (or any of Printf analogs due to floats usage), we should find (or create) a canonical way of building errors with context.

At the moment it looks like: return errors.New("smth went wrong with ID (" + strconv.Atoi(ID) + "): not found") to build an error like smth went wrong with ID (100): not found. This is quite heavy 🤷‍♂️