From 48e2e1a87d6c038a6451d034ddbf0146c3d1d7cf Mon Sep 17 00:00:00 2001
From: Martin Lowe <martin.lowe@eclipse-foundation.org>
Date: Mon, 27 May 2024 12:05:41 -0400
Subject: [PATCH] Add request body to output in server error cases for easier
 debugging

Related to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4675
---
 src/main/rb/eca.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/rb/eca.rb b/src/main/rb/eca.rb
index 38893125..7fa953ba 100644
--- a/src/main/rb/eca.rb
+++ b/src/main/rb/eca.rb
@@ -161,6 +161,8 @@ begin
   parsed_response = MultiJson.load(response.body)
 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"
+  ## 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
 else
   ## Tracks if warnings/errors were issued for request 
-- 
GitLab