Skip to content

Commit b1e3a07

Browse files
pasha-codefreshjannfis
authored andcommitted
fix: application exist panic when execute api call (#8188)
fix: application exist panic when execute api call (#8188) Signed-off-by: pashavictorovich <[email protected]>
1 parent c3144c0 commit b1e3a07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/application/application.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateReq
213213
return existing, nil
214214
}
215215
if q.Upsert == nil || !*q.Upsert {
216-
return nil, status.Errorf(codes.InvalidArgument, argo.GenerateSpecIsDifferentErrorMessage("application", existing.Spec, a.Spec))
216+
return nil, status.Errorf(codes.InvalidArgument, "existing application spec is different, use upsert flag to force update")
217217
}
218218
if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionUpdate, appRBACName(a)); err != nil {
219219
return nil, err

0 commit comments

Comments
 (0)