Skip to content
Snippets Groups Projects
Commit fb604b1a authored by Holger's avatar Holger
Browse files

Switch to next node when follow api is not enabled

parent f5a67a4d
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,10 @@ class NoApiWithName(RPCError):
pass
class FollowApiNotEnabled(RPCError):
pass
class ApiNotSupported(RPCError):
pass
......
......@@ -125,6 +125,12 @@ class SteemNodeRPC(GrapheneRPC):
raise exceptions.ApiNotSupported(msg)
else:
raise exceptions.NoApiWithName(msg)
elif re.search("follow_api_plugin not enabled", msg):
if self.nodes.working_nodes_count > 1 and self.nodes.num_retries > -1:
self._switch_to_next_node(str(e))
doRetry = True
else:
raise exceptions.FollowApiNotEnabled(msg)
elif re.search("irrelevant signature included", msg):
raise exceptions.UnnecessarySignatureDetected(msg)
elif re.search("WinError", msg):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment