From 5c3ff5da72402146ea90376b519861923f8435a2 Mon Sep 17 00:00:00 2001 From: KwangSeob Jeong Date: Fri, 10 Feb 2017 09:20:27 +0900 Subject: [PATCH] refined http response status. --- src/Issue/IssueService.php | 3 +-- src/JiraClient.php | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Issue/IssueService.php b/src/Issue/IssueService.php index e042d79c..d64dc513 100644 --- a/src/Issue/IssueService.php +++ b/src/Issue/IssueService.php @@ -550,8 +550,7 @@ public function getCustomFields($priorityId) * add watcher to issue. * * @param mixed $issueIdOrKey - * @param object $watcher - * @param int $worklogId + * @param string $watcher watcher id * * @return bool */ diff --git a/src/JiraClient.php b/src/JiraClient.php index 94ef2e7a..625436a9 100644 --- a/src/JiraClient.php +++ b/src/JiraClient.php @@ -197,8 +197,10 @@ public function exec($context, $post_data = null, $custom_request = null) } // HostNotFound, No route to Host, etc Network error - $this->log->addError('CURL Error: = '.$body); - throw new JiraException('CURL Error: = '.$body); + $msg = sprintf("CURL Error: http response=%d, %s", $this->http_response, $body); + + $this->log->addError($msg); + throw new JiraException($msg); } else { // if request was ok, parsing http response code. $this->http_response = curl_getinfo($ch, CURLINFO_HTTP_CODE);