Skip to content

Commit f9f44c6

Browse files
authored
Merge pull request #157 from php-http/clarify-error-plugin
add warning in error plugin
2 parents 9da616d + afa7836 commit f9f44c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Plugin/ErrorPlugin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
*
1818
* Status codes 400-499 lead to a ClientErrorException, status 500-599 to a ServerErrorException.
1919
*
20+
* Warning
21+
* =======
22+
*
23+
* Throwing an exception on a valid response violates the PSR-18 specification.
24+
* This plugin is provided as a convenience when writing a small application.
25+
* When providing a client to a third party library, this plugin must not be
26+
* included, or the third party library will have problems with error handling.
27+
*
2028
* @author Joel Wurtz <[email protected]>
2129
*/
2230
final class ErrorPlugin implements Plugin

0 commit comments

Comments
 (0)