Skip to content

Commit

Permalink
fix: application exist panic when execute api call (#8188)
Browse files Browse the repository at this point in the history
fix: application exist panic when execute api call (#8188)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
  • Loading branch information
pasha-codefresh authored and jannfis committed Jan 15, 2022
1 parent c3144c0 commit b1e3a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/application/application.go
Expand Up @@ -213,7 +213,7 @@ func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateReq
return existing, nil
}
if q.Upsert == nil || !*q.Upsert {
return nil, status.Errorf(codes.InvalidArgument, argo.GenerateSpecIsDifferentErrorMessage("application", existing.Spec, a.Spec))
return nil, status.Errorf(codes.InvalidArgument, "existing application spec is different, use upsert flag to force update")
}
if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionUpdate, appRBACName(a)); err != nil {
return nil, err
Expand Down

0 comments on commit b1e3a07

Please sign in to comment.