Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method UnexpectedResponseException::getResponse() #364

Closed
Art4 opened this issue Jan 18, 2024 · 0 comments · Fixed by #369
Closed

Add method UnexpectedResponseException::getResponse() #364

Art4 opened this issue Jan 18, 2024 · 0 comments · Fixed by #369
Assignees
Milestone

Comments

@Art4
Copy link
Collaborator

Art4 commented Jan 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant