diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 06:11:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 06:11:24 +0300 |
commit | 729e66ee8e5790eefb3771040839155c499faab3 (patch) | |
tree | 19cd1fd73c2373c20d2888e857de022129a79eaa /lib/api/helpers.rb | |
parent | 431b84710e87a649de02d398568804f820e3b0fe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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) |