Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r--lib/api/runner.rb6
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