summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/helpers.rb2
-rw-r--r--lib/api/job_artifacts.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 6fa1527461f..e646c63467a 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -222,7 +222,7 @@ module API
def bad_request!(attribute)
message = ["400 (Bad request)"]
- message << "\"" + attribute.to_s + "\" not given"
+ message << "\"" + attribute.to_s + "\" not given" if attribute
render_api_error!(message.join(' '), 400)
end
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb
index e0c5449e65e..2a8fa7659bf 100644
--- a/lib/api/job_artifacts.rb
+++ b/lib/api/job_artifacts.rb
@@ -52,7 +52,7 @@ module API
path = Gitlab::Ci::Build::Artifacts::Path
.new(params[:artifact_path])
- not_found! unless path.valid?
+ bad_request! unless path.valid?
send_artifacts_entry(build, path)
end