Commit c922fb4b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Respond with a bad request if artifact path is invalid

parent 80b3dcc7
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment