gitlabhq/gitlabhq · error · Gitlab::Graphql::Errors::ArgumentError
Ref is not valid
Error message
Ref is not valid
What it means
Error "Ref is not valid" thrown in gitlabhq/gitlabhq.
Source
Thrown at app/graphql/resolvers/blobs_resolver.rb:60
def resolve_with_lookahead(paths:, ref:, ref_type:)
authorize!(repository.container)
return [] if paths.empty? || repository.empty?
ref ||= repository.root_ref
validate_ref!(ref)
ref_path_pairs = build_ref_path_pairs(paths, ref, ref_type)
validate_blob_data_size_within_limit!(ref_path_pairs) if validate_blob_data_size?(paths)
repository.blobs_at(ref_path_pairs).each { |blob| blob.ref_type = ref_type }
end
def validate_ref!(ref)
return if Gitlab::GitRefValidator.validate(ref, skip_head_ref_check: true)
raise Gitlab::Graphql::Errors::ArgumentError, 'Ref is not valid'
end
def build_ref_path_pairs(paths, ref, ref_type)
qualified_ref = ExtractsRef::RefExtractor.qualify_ref(ref, ref_type)
paths.map { |path| [qualified_ref, path] }
end
def validate_blob_data_size?(paths)
paths.size > 1 && data_fields_requested?
end
def data_fields_requested?
DATA_FIELDS.intersect?(selected_fields)
end
def validate_blob_data_size_within_limit!(ref_path_pairs)
total_blob_data_size = repository.blobs_at(ref_path_pairs, blob_size_limit: 0).sum(&:size)
View on GitHub (pinned to 55ee20384a)
When it happens
Trigger: Thrown at app/graphql/resolvers/blobs_resolver.rb:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gitlabhq/gitlabhq@55ee20384a (2026-08-21).
Data as JSON: /api/errors/dc3be19321826c6d.
Report an issue: GitHub.