Skip to content

ActionController::UrlGenerationError for old path redirects

Vasilii Iakliushin requested to merge 452061_fix_url_generation_error into master

What does this MR do and why?

Contributes to #452061 (closed)

Sentry error: https://new-sentry.gitlab.net/organizations/gitlab/issues/699014

Problem

When project path was changed, then we try to redirect all requests from the old path to the new path.

But it's possible that some parameters of the request are incorrect and the generation of new path URL fails.

As a result, we return a 500 error to the user.

Solution

Add an error handler for this case. If the URL generation is not successful, then display a 404 page.

Edited by Vasilii Iakliushin

Merge request reports

Loading