Skip to content

Fix 500 error for CompareController

Vasilii Iakliushin requested to merge fix_500_error_for_compare_controller into master

What does this MR do and why?

Sentry error: https://sentry.gitlab.net/gitlab/gitlabcom/issues/3321361

Problem

User can provide empty string as a parameter. This value causes a 500 error when we try generate the link.

Solution

Convert empty strings to nil values that correctly processed.

How to set up and validate locally

  1. Visit link http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/compare?to=&from=
  2. Verify that the error is gone

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports