-
Notifications
You must be signed in to change notification settings - Fork 39
document when exception is thrown #82
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
Comments
I would not bring the error plugin here. Otherwise, I agree. |
There may be case where you have an exception and a response, like you received all the status code and the headers, but connection was interrupted when receiving the body of the response. (So you have a response, which is incomplete, but can always be used for debugging purpose) |
I would say in this case you don't have a response and should be a network error returned. Longer answer: you cannot return a complete Response object. |
i guess it depends on the client what kind of exception it throws in that case. but an exception must will be thrown as there won't be a HTTP status code in the response for this situation. why not mention the error plugin? |
Actually, I don't mind mentioning the error plugin, but it is some sort of coupling to an implementation which feels weird IMHO. |
Can this be closed in favor of #87 ? |
Allow CURL constant names and validate we found them
as discussed in php-http/documentation#30, we seem to only throw an exception when there is no response object available.
i guess that is what we agreed on, but if that is correct, we should update the phpdoc of Client to say when exceptions are thrown (basically if no response is available due to errors in the networking, or if the client decides to throw an exception for other reasons... maybe we should just mention the error plugin to make this more concrete. would that make sense?)
The text was updated successfully, but these errors were encountered: