Commit d97b6ef7 authored by Kate Grechishkina's avatar Kate Grechishkina Committed by Heinrich Lee Yu

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

parent 21c8b38c
......@@ -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