diff options
Diffstat (limited to 'lib/api/triggers.rb')
-rw-r--r-- | lib/api/triggers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/triggers.rb b/lib/api/triggers.rb index 84c51e5aeac..a359083a9d2 100644 --- a/lib/api/triggers.rb +++ b/lib/api/triggers.rb @@ -37,7 +37,7 @@ module API result = ::Ci::PipelineTriggerService.new(project, nil, params).execute not_found! unless result - if result[:http_status] + if result.error? render_api_error!(result[:message], result[:http_status]) else present result[:pipeline], with: Entities::Ci::Pipeline |