Skip to content

Commit

Permalink
refined http response status.
Browse files Browse the repository at this point in the history
  • Loading branch information
lesstif committed Feb 10, 2017
1 parent bea98cb commit 5c3ff5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Issue/IssueService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
6 changes: 4 additions & 2 deletions src/JiraClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c3ff5d

Please sign in to comment.