From 99ff24fdc395cc549a35f2f5018a54d30217b4b1 Mon Sep 17 00:00:00 2001 From: John-Alan Simmons Date: Tue, 23 Jan 2024 01:06:38 -0500 Subject: [PATCH] fix: removed panics from acp check --- x/acp/keeper/msg_server_check_access.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/acp/keeper/msg_server_check_access.go b/x/acp/keeper/msg_server_check_access.go index 1bb8889..b8053f0 100644 --- a/x/acp/keeper/msg_server_check_access.go +++ b/x/acp/keeper/msg_server_check_access.go @@ -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{