Skip to content

Commit

Permalink
fix(deployment): improve error message when querying deployements (#1411
Browse files Browse the repository at this point in the history
)

in test cases esqrow account can be mistakenly missed
and query returns confusing error "account not found"

Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian authored Oct 14, 2021
1 parent 22c9f5d commit 953eaf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/deployment/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keeper
import (
"context"

"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down Expand Up @@ -54,7 +55,7 @@ func (k Querier) Deployments(c context.Context, req *types.QueryDeploymentsReque
types.EscrowAccountForDeployment(deployment.ID()),
)
if err != nil {
return true, err
return true, errors.Wrapf(err, "fetching escrow account for DeploymentID=%s", deployment.DeploymentID)
}

value := types.QueryDeploymentResponse{
Expand Down

0 comments on commit 953eaf3

Please sign in to comment.