Skip to content

Commit 03e782c

Browse files
joelwurtzdbu
authored andcommitted
Doc about server exception option in ErrorPlugin (#235)
Doc about server exception option in ErrorPlugin
1 parent a5f05eb commit 03e782c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/error.rst

+5
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ writing a library around an API, the best practice is to have the client convert
3636
domain objects, and transform HTTP errors into meaningful domain exceptions. In that scenario,
3737
the ErrorPlugin is not needed. It is more efficient to check the HTTP status codes yourself than
3838
throwing and catching exceptions.
39+
40+
If your application handles responses with 4xx status codes, but needs exceptions for 5xx status codes only,
41+
you can set the option ``only_server_exception`` to ``true``::
42+
43+
$errorPlugin = new ErrorPlugin(['only_server_exception' => true]);

0 commit comments

Comments
 (0)