Skip to content

Commit

Permalink
fix: removed panics from acp check
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimnz committed Jan 23, 2024
1 parent 3f76d13 commit 99ff24f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/acp/keeper/msg_server_check_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func (k msgServer) CheckAccess(goCtx context.Context, msg *types.MsgCheckAccess)

creatorAddr, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic("creator must exist")
return nil, types.ErrInvalidAccAddr
}
creatorAcc := k.accountKeeper.GetAccount(ctx, creatorAddr)
if creatorAcc == nil {
panic("creator must exist")
return nil, types.ErrAccNotFound
}

cmd := access_decision.EvaluateAccessRequestsCommand{
Expand Down

0 comments on commit 99ff24f

Please sign in to comment.