Skip to content
Snippets Groups Projects
Commit 48e2e1a8 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Add request body to output in server error cases for easier debugging

Related to eclipsefdn/helpdesk#4675
parent 1312c751
Branches feat/sysinfo
No related tags found
1 merge request!193Add request body to output in server error cases for easier debugging
Pipeline #46581 passed
...@@ -161,6 +161,8 @@ begin ...@@ -161,6 +161,8 @@ begin
parsed_response = MultiJson.load(response.body) parsed_response = MultiJson.load(response.body)
rescue MultiJson::ParseError rescue MultiJson::ParseError
puts "GL-HOOK-ERR: Unable to validate commit, server error encountered.\n\nPlease contact the administrator, and retry the commit at a later time.\n\n" puts "GL-HOOK-ERR: Unable to validate commit, server error encountered.\n\nPlease contact the administrator, and retry the commit at a later time.\n\n"
## Additional information for debugging - request will allow us to easily retest exact output and find errors in render
puts "Request body: #{MultiJson.dump(json_data)}\n\n"
exit 1 exit 1
else else
## Tracks if warnings/errors were issued for request ## Tracks if warnings/errors were issued for request
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment