From dbef9f21511f1b06135763e93bac484d49c4d72c Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 31 Jul 2018 12:58:26 -0700 Subject: Hide error details if there are none --- lib/bitbucket_server/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/bitbucket_server/connection.rb') diff --git a/lib/bitbucket_server/connection.rb b/lib/bitbucket_server/connection.rb index ee0888eeecf..e100d8bde1c 100644 --- a/lib/bitbucket_server/connection.rb +++ b/lib/bitbucket_server/connection.rb @@ -65,7 +65,7 @@ module BitbucketServer details = sanitize(response.parsed_response.dig('errors', 0, 'message')) message = "Error #{response.code}" - message += ": #{details}" + message += ": #{details}" if details raise ConnectionError, message rescue JSON::ParserError -- cgit v1.2.1