Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-14 15:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-14 15:08:03 +0300
commit61a82b8ec062d6f122dadd38783c7754cef7ce2b (patch)
tree071d1ded4f507d77bac97156aa1fa85c95c0cba5 /lib/gitlab/json.rb
parent3ed578edf525bce3167860b84f6b43bab5065cf5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/json.rb')
-rw-r--r--lib/gitlab/json.rb4
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