Container registry return 403 instead of 500 for permission errors
What does this MR do and why?
In https://gitlab.com/gitlab-com/request-for-help/-/issues/2943#note_2544621665
we realized that we are returning a 500 for something that should really be a 403, namely permission related issues.
This MR aims to check for the type of an error when returned and properly return a 403.
References
Closes #547910
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Filip Aleksic