diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 15:08:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 15:08:56 +0000 |
commit | 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (patch) | |
tree | 8eb149293eee90ec2750b6ac5e46a111a806424e /lib/api | |
parent | 66d4203791a01fdedf668a78818a229ea2c07aad (diff) | |
download | gitlab-ce-17ab40ca089e1aef61a83f77ab6df62a72f6ce06.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/runner.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index e1c79aa8efe..0b6bad6708b 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -283,10 +283,12 @@ module API bad_request!('Missing artifacts file!') unless artifacts file_too_large! unless artifacts.size < max_artifacts_size(job) - if Ci::CreateJobArtifactsService.new.execute(job, artifacts, params, metadata_file: metadata) + result = Ci::CreateJobArtifactsService.new(job.project).execute(job, artifacts, params, metadata_file: metadata) + + if result[:status] == :success status :created else - render_validation_error!(job) + render_api_error!(result[:message], result[:http_status]) end end |