diff options
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/clusters/applications_controller.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/controllers/projects/clusters/applications_controller.rb b/app/controllers/projects/clusters/applications_controller.rb index 4b9d54a8537..90c7fa62216 100644 --- a/app/controllers/projects/clusters/applications_controller.rb +++ b/app/controllers/projects/clusters/applications_controller.rb @@ -5,14 +5,12 @@ class Projects::Clusters::ApplicationsController < Projects::ApplicationControll before_action :authorize_create_cluster!, only: [:create] def create - scheduled = Clusters::Applications::ScheduleInstallationService.new(project, current_user, - application_class: @application_class, - cluster: @cluster).execute - if scheduled - head :no_content - else - head :bad_request - end + Clusters::Applications::ScheduleInstallationService.new(project, current_user, + application_class: @application_class, + cluster: @cluster).execute + head :no_content + rescue StandardError + head :bad_request end private |