From 729e66ee8e5790eefb3771040839155c499faab3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 27 Jan 2023 03:11:24 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/helpers.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 2adcdb0598a..197bd420295 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -504,12 +504,12 @@ module API def render_validation_error!(model, status = 400) if model.errors.any? - render_api_error!(model_error_messages(model) || '400 Bad Request', status) + render_api_error!(model_errors(model).messages || '400 Bad Request', status) end end - def model_error_messages(model) - model.errors.messages + def model_errors(model) + model.errors end def render_api_error_with_reason!(status, message, reason) -- cgit v1.2.3