Skip to content

Commit a015283

Browse files
authored
remove panic on unimnplemented service (#374)
1 parent fcd2757 commit a015283

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

x/avs/keeper/msg_server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ func (m MsgServerImpl) SubmitTaskResult(goCtx context.Context, req *types.Submit
2828

2929
func (m MsgServerImpl) RegisterAVS(_ context.Context, _ *types.RegisterAVSReq) (*types.RegisterAVSResponse, error) {
3030
// TODO implement me
31-
panic("implement me")
31+
return nil, types.ErrNotFound.Wrap("RegisterAVS not implemented")
3232
}
3333

3434
func (m MsgServerImpl) DeRegisterAVS(_ context.Context, _ *types.DeRegisterAVSReq) (*types.DeRegisterAVSResponse, error) {
3535
// TODO implement me
36-
panic("implement me")
36+
return nil, types.ErrNotFound.Wrap("DeRegisterAVS not implemented")
3737
}
3838

3939
func (m MsgServerImpl) RegisterAVSTask(_ context.Context, _ *types.RegisterAVSTaskReq) (*types.RegisterAVSTaskResponse, error) {
4040
// TODO implement me
41-
panic("implement me")
41+
return nil, types.ErrNotFound.Wrap("RegisterAVSTask not implemented")
4242
}

x/avs/types/errors.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,8 @@ var (
115115
ModuleName, 27,
116116
" The response was submitted too soon.",
117117
)
118+
ErrNotFound = errorsmod.Register(
119+
ModuleName, 28,
120+
"Resource not found",
121+
)
118122
)

0 commit comments

Comments
 (0)