fix: do not throw on lack of response

Expected proto3 behaviour, just no message returned.
This commit is contained in:
fryorcraken.eth 2022-08-17 22:39:19 +10:00
parent 28cb144b23
commit ecb5b490e3
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ export class WakuStore {
const reply = historyRpcQuery.decode(bytes); const reply = historyRpcQuery.decode(bytes);
if (!reply.response) { if (!reply.response) {
throw "History response misses response field"; dbg("No message returned from store: `response` field missing");
} }
const response = reply.response as protoV2Beta4.HistoryResponse; const response = reply.response as protoV2Beta4.HistoryResponse;