diff options
Diffstat (limited to 'app/controllers/projects/alerting/notifications_controller.rb')
-rw-r--r-- | app/controllers/projects/alerting/notifications_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/alerting/notifications_controller.rb b/app/controllers/projects/alerting/notifications_controller.rb index f3283c88740..89e8a261288 100644 --- a/app/controllers/projects/alerting/notifications_controller.rb +++ b/app/controllers/projects/alerting/notifications_controller.rb @@ -18,8 +18,9 @@ module Projects def create token = extract_alert_manager_token(request) result = notify_service.execute(token, integration) + has_something_to_return = result.success? && result.http_status != :created - if result.success? + if has_something_to_return render json: AlertManagement::AlertSerializer.new.represent(result.payload[:alerts]), code: result.http_status else head result.http_status |