Skip to content
Snippets Groups Projects
Commit 8fb43bef authored by Jason Salyers's avatar Jason Salyers
Browse files

[JES] Try and examine the error message to see if it's an actual error or not....

[JES] Try and examine the error message to see if it's an actual error or not. If not, return an empty string
parent 2d7ee83d
No related branches found
No related tags found
1 merge request!27[JES] Try and examine the error message to see if it's an actual error or not....
...@@ -46,6 +46,12 @@ export function jsonRpc(uri, {method, id, params, fetchMethod=fetch}) { ...@@ -46,6 +46,12 @@ export function jsonRpc(uri, {method, id, params, fetchMethod=fetch}) {
throw new Error(`Invalid response id: ${ rpcRes.id }`); throw new Error(`Invalid response id: ${ rpcRes.id }`);
} }
if (rpcRes.error) { if (rpcRes.error) {
if (rpcRes.error.data.toString().includes('does not exist'))
{
//hivemind returns an error when tags aren't found, but it's not really an error
//because the http return code was ok, so just return an empty response instead
return "";
}
throw new RPCError(rpcRes.error); throw new RPCError(rpcRes.error);
} }
return rpcRes.result return rpcRes.result
......
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