bugfix: Crash on trying to start a non-existant action from the API
This commit is contained in:
parent
8258a758d2
commit
9723a38ca1
|
|
@ -69,6 +69,10 @@ func (api *oliveTinAPI) StartAction(ctx ctx.Context, req *pb.StartActionRequest)
|
|||
pair := api.executor.MapActionIdToBinding[req.ActionId]
|
||||
api.executor.MapActionIdToBindingLock.RUnlock()
|
||||
|
||||
if pair == nil || pair.Action == nil {
|
||||
return nil, errors.New("Action not found")
|
||||
}
|
||||
|
||||
execReq := executor.ExecutionRequest{
|
||||
Action: pair.Action,
|
||||
EntityPrefix: pair.EntityPrefix,
|
||||
|
|
|
|||
Loading…
Reference in New Issue