Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle Elastica Transport errors (#1465)
* Elastica/Client uses getTransportInfo and throws an exception if couldn't connect to ES host * Pass errored response body in transportInfo * Revert changes is composer.json - no longer point to a fork of ruflin/Elistica * Switch to ruflin/elastica 6.1 in composer.json * Factor out the forbidden HTTP codes Put in configuration instead of hard-coding in the Client class Unit test the configuration Defaults are 400, 403, 404 Refactor unit tests and mocks for the Client * Switch from Exception to Elastica\Exception\ClientException Update unit test * Refactor following discussion in ruflin/Elastica * Remove double carrige return * Handle responseData being a string or an array * Update composer.json
- Loading branch information
Showing
5 changed files
with
106 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters