Fix GRPC 500 from BlobsResolver
What does this MR do and why?
This MR fixes a bug that occurred when an invalid ref was passed to BlobsResolver
, which resulted in a GRPC::InvalidArgument
being thrown and a 500 for the requester.
Now, BlobsResolver
validates the ref and returns a GraphQL ArgumentError
with the message Ref is not valid
Resolves: GRPC::InvalidArgumentGraphqlController#execute
Part of: #349973 (closed)
Screenshots or screen recordings
Before the fix:
After the fix:
How to set up and validate locally
- Go to
/-/graphql-explorer
- Enter the following query with your own project and file path:
{ project(fullPath: "PROJECT_FULL_PATH") { repository { blobs(paths: "REAL_FILE_PATH", ref: ":::") { nodes { id } } } } }
- After submitting the query, see that you receive the following message:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Avielle Wolfe