Added new utils function to merge dictionaries deeply, BaseParser.parse_error was improved to handle more type of exceptions. #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, we will be able to merge dictionaries deeply using "dict_deep_merge" function. Also i ve changed the parse_error logic to handle more types of exceptions like below.
'ERR': {
'max number of clients reached': ConnectionError
'Unknown node': UnknownNodeError
}
Currently, i am developing something to manage redis cluster and i need to write my own parser which is ClusterParser. I need to extend EXCEPTION_CLASSES on BaseParser with mine, cause i should parse ResponseError('ERR Unknown node 012e6851abadb8c1c948c0f1cbbe7f68deb8bd24') into UnknownNodeError <node_id>. So with this implementation, everyone can write their own parsers easily.