From 03a3b63c4db745547d7fe5dceb43981d00554aa7 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 15 Jul 2019 12:38:31 +1000 Subject: [PATCH] feat: use hardcoded error message when error class has a nil message --- lib/pact_broker/api/resources/error_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact_broker/api/resources/error_handler.rb b/lib/pact_broker/api/resources/error_handler.rb index d745dd22a..52924cdf8 100644 --- a/lib/pact_broker/api/resources/error_handler.rb +++ b/lib/pact_broker/api/resources/error_handler.rb @@ -29,7 +29,7 @@ def self.reportable?(e) def self.display_message(e, error_reference) if PactBroker.configuration.show_backtrace_in_error_response? - e.message + e.message || obfuscated_error_message(error_reference) else reportable?(e) ? obfuscated_error_message(error_reference) : e.message end