Fix undefined method `downcase' error
What does this MR do and why?
Contributes to https://new-sentry.gitlab.net/organizations/gitlab/issues/483109
Problem
Users can provide an object type that doesn't support downcase
method (for example, a hash). That leads to 500 error.
Solution
Convert the ref_type value to string before calling downcase
method.
Screenshots or screen recordings
How to set up and validate locally
- Visit http://gdk.test:3000/gitlab-org/gitlab-test/-/blob/master/README.md?ref_type[a]=b (update the URI if necessary)
- You shouldn't see an error
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.