From 8fb43beff6c5f81c696a7af2a470e2c6cecba3e2 Mon Sep 17 00:00:00 2001 From: jsalyers <jsalyers@syncad.com> Date: Wed, 4 Aug 2021 11:41:03 -0400 Subject: [PATCH] [JES] Try and examine the error message to see if it's an actual error or not. If not, return an empty string --- src/api/transports/http.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/transports/http.js b/src/api/transports/http.js index 0093d6e..dad9ecf 100644 --- a/src/api/transports/http.js +++ b/src/api/transports/http.js @@ -46,6 +46,12 @@ export function jsonRpc(uri, {method, id, params, fetchMethod=fetch}) { throw new Error(`Invalid response id: ${ rpcRes.id }`); } 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); } return rpcRes.result -- GitLab