cli icon indicating copy to clipboard operation
cli copied to clipboard

Create a routine to parse `ErrNotFound` from returned error

Open lumtis opened this issue 3 years ago • 0 comments

Context: https://github.com/ignite/cli/pull/2516/files#r892287966

Create a routine with the duplicated logic:

if cosmoserror.Unwrap(err) == cosmoserror.ErrNotFound {
  return "", ErrObjectNotFound
} else if err != nil {
  return "", err
}

lumtis avatar Jul 27 '22 07:07 lumtis