Add response body to InvalidStatusException

This commit is contained in:
Frédéric Guillot
2018-03-02 13:41:37 -08:00
parent ebe04e672c
commit f92eb448cb
2 changed files with 12 additions and 6 deletions

View File

@@ -5,15 +5,22 @@ namespace Kanboard\Core\Http;
class InvalidStatusException extends ClientException
{
protected $statusCode = 0;
protected $body = '';
public function __construct($message, $statusCode)
public function __construct($message, $statusCode, $body)
{
parent::__construct($message);
$this->statusCode = $statusCode;
$this->body = $body;
}
public function getStatusCode()
{
return $this->statusCode;
}
public function getBody()
{
return $this->body;
}
}