diff --git a/package.json b/package.json index 0ad6200..28f60be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.18.4", + "version": "0.18.5", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/services/OrionAggregator/ws/index.ts b/src/services/OrionAggregator/ws/index.ts index cf0affe..ec5cd96 100644 --- a/src/services/OrionAggregator/ws/index.ts +++ b/src/services/OrionAggregator/ws/index.ts @@ -373,9 +373,9 @@ class OrionAggregatorWS { const { id } = err; if (id !== undefined) { const subType = objectKeys(this.subscriptions).find((st) => this.subscriptions[st]?.[id]); - if (subType === undefined) throw new Error('OrionAggregatorWS: cannot find subscription type by id'); + if (subType === undefined) throw new Error(`OrionAggregatorWS: cannot find subscription type by id ${id}. Current subscriptions: ${JSON.stringify(this.subscriptions)}`); const sub = this.subscriptions[subType]?.[id]; - if (sub === undefined) throw new Error('OrionAggregatorWS: cannot find subscription by id'); + if (sub === undefined) throw new Error(`OrionAggregatorWS: cannot find subscription by id ${id}. Current subscriptions: ${JSON.stringify(this.subscriptions)}`); if ('errorCb' in sub) { sub.errorCb(err.m); }