Commit 79e6b4db authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'kg-add-include-error-verbosity' into 'master'

Extend the error when the project is not found at include:file

See merge request gitlab-org/gitlab!50764
parents f72d6331 d97b6ef7
......@@ -63,7 +63,7 @@ RSpec.describe Ci::CreatePipelineService do
context 'when user does not have access to compliance project' do
it 'includes access denied error' do
expect(execute.payload.yaml_errors).to eq "Project `compliance/hippa` not found or access denied!"
expect(execute.payload.yaml_errors).to eq "Project `compliance/hippa` not found or access denied! Make sure any includes in the pipeline configuration are correctly defined."
end
it 'does not persist jobs' do
......
......@@ -31,7 +31,7 @@ module Gitlab
def validate_content!
if !can_access_local_content?
errors.push("Project `#{project_name}` not found or access denied!")
errors.push("Project `#{project_name}` not found or access denied! Make sure any includes in the pipeline configuration are correctly defined.")
elsif sha.nil?
errors.push("Project `#{project_name}` reference `#{ref_name}` does not exist!")
elsif content.nil?
......
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