fix: throw error when no response (#1567)

This commit is contained in:
Sasha 2023-09-14 13:35:10 +02:00 committed by GitHub
parent b42601d156
commit d049ebbc34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,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());