Handle exception for binary files blame

What does this MR do and why?

Contributes to #385899 (closed)

Problem

Server returns a 500 error when user tries to blame a binary file.

Solution

Redirect user to blob view with an error message.

How to set up and validate locally

  1. Visit http://127.0.0.1:3000/gitlab-org/gitlab-test/-/blame/master/files/images/emoji.png
  2. You should be redirected to blob view with a message that blame is not supported for binary files

Screenshot_2023-05-23_at_14.09.14

MR acceptance checklist

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

Edited by Vasilii Iakliushin

Merge request reports

Loading