summaryrefslogtreecommitdiff
path: root/lib/gitlab/diff/highlight_cache.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/diff/highlight_cache.rb')
-rw-r--r--lib/gitlab/diff/highlight_cache.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/diff/highlight_cache.rb b/lib/gitlab/diff/highlight_cache.rb
index a792eafde79..075027ebdc8 100644
--- a/lib/gitlab/diff/highlight_cache.rb
+++ b/lib/gitlab/diff/highlight_cache.rb
@@ -132,6 +132,8 @@ module Gitlab
diff_file_id,
gzip_compress(highlighted_diff_lines_hash.to_json)
)
+ rescue Encoding::UndefinedConversionError
+ nil
end
# HSETs have to have their expiration date manually updated