Updating workflow_server.go to use GRPCError().

This commit is contained in:
Aleksandr Melnikov
2020-02-10 16:32:09 -08:00
parent b0cea10a08
commit 816a14bff1

View File

@@ -71,7 +71,9 @@ func (s *WorkflowServer) CreateWorkflow(ctx context.Context, req *api.CreateWork
wf, err := s.resourceManager.CreateWorkflow(req.Namespace, workflow)
if err != nil {
return nil, err
if errors.As(err, &userError) {
return nil, userError.GRPCError()
}
}
return apiWorkflow(wf), nil