mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-19 11:55:08 +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)
|
wf, err := s.resourceManager.CreateWorkflow(req.Namespace, workflow)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
if errors.As(err, &userError) {
|
||||||
|
return nil, userError.GRPCError()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiWorkflow(wf), nil
|
return apiWorkflow(wf), nil
|
||||||
|
Reference in New Issue
Block a user