Commit cf36f02d authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '28779-allow-messages-to-be-returned-in-405-response-in-api' into 'master'

Allow additional msg to be passed in 405 response

See merge request gitlab-org/gitlab!47224
parents 5cf5bd2e 532f2225
......@@ -387,8 +387,8 @@ module API
render_api_error!('401 Unauthorized', 401)
end
def not_allowed!
render_api_error!('405 Method Not Allowed', 405)
def not_allowed!(message = nil)
render_api_error!(message || '405 Method Not Allowed', :method_not_allowed)
end
def not_acceptable!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment