diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-14 15:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-14 15:08:03 +0300 |
commit | 61a82b8ec062d6f122dadd38783c7754cef7ce2b (patch) | |
tree | 071d1ded4f507d77bac97156aa1fa85c95c0cba5 /lib/gitlab/json.rb | |
parent | 3ed578edf525bce3167860b84f6b43bab5065cf5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/json.rb')
-rw-r--r-- | lib/gitlab/json.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/json.rb b/lib/gitlab/json.rb index d248ad2eeca..8332e4f6d56 100644 --- a/lib/gitlab/json.rb +++ b/lib/gitlab/json.rb @@ -264,6 +264,10 @@ module Gitlab # config/initializers/active_support_json.rb def stringify(jsonified) Gitlab::Json.dump(jsonified) + rescue EncodingError => ex + # Raise the same error as the default implementation if we encounter + # an error. These are usually related to invalid UTF-8 errors. + raise JSON::GeneratorError, ex end end end |