mirror of https://github.com/waku-org/js-waku.git
fix: handle all empty responses in filter (#1688)
This commit is contained in:
parent
9593a8a8a5
commit
b3864f8772
|
@ -184,6 +184,12 @@ class Subscription {
|
|||
async (source) => await all(source)
|
||||
);
|
||||
|
||||
if (!res || !res.length) {
|
||||
throw Error(
|
||||
`No response received for request ${request.requestId}: ${res}`
|
||||
);
|
||||
}
|
||||
|
||||
const { statusCode, requestId, statusDesc } =
|
||||
FilterSubscribeResponse.decode(res[0].slice());
|
||||
|
||||
|
@ -216,6 +222,12 @@ class Subscription {
|
|||
async (source) => await all(source)
|
||||
);
|
||||
|
||||
if (!res || !res.length) {
|
||||
throw Error(
|
||||
`No response received for request ${request.requestId}: ${res}`
|
||||
);
|
||||
}
|
||||
|
||||
const { statusCode, requestId, statusDesc } =
|
||||
FilterSubscribeResponse.decode(res[0].slice());
|
||||
|
||||
|
|
Loading…
Reference in New Issue