Skip to content

Added note about HttpException is not thrown by default #132

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

Merged
merged 2 commits into from
Aug 3, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions httplug/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ TransferException something unexpected happened \-
``getResponse()``
================================== ============================= ===================

.. note::
By default clients will always return a PSR-7 response instead of throwing a HttpException. Configure your client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would say: Write your application to check the response status or use the plugin to make sure the HttpException is thrown.

configuring the actual client to throw exceptions should be discouraged, it will mess with the plugin chain and logging http errors, among other things.

or use the :doc:`/plugins/error` to make sure the HttpException is thrown.

.. note::

The ``sendAsyncRequest`` should never throw an exception but always return a
Expand Down