mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-09 15:40:03 +08:00
Updating workflow_server.go to use GRPCError().
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user