Add method `UnexpectedResponseException::getResponse()`
Art4 opened this issue · comments
Artur Weigandt commented
In v2.4.0 we've introduced the UnexpectedResponseException
if the Redmine server delivers an unexpected response. Since #357 we have a Response
interface.
I propose to add a new method to the UnexpectedResponseException
to get the response.
public static function create(Response $response, $previous = null): self
public function getResponse(): ?Response
Requiring a Response would be a breaking change, so getResponse()
could also return null
. There also might be cases were we won't have the Response.