@t2000/sdk 0.18.3 → 0.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -212,15 +212,20 @@ var ProtocolRegistry = class {
212
212
  }
213
213
  async allPositions(address) {
214
214
  const results = [];
215
+ const errors = [];
215
216
  for (const adapter of this.lending.values()) {
216
217
  try {
217
218
  const positions = await adapter.getPositions(address);
218
219
  if (positions.supplies.length > 0 || positions.borrows.length > 0) {
219
220
  results.push({ protocol: adapter.name, protocolId: adapter.id, positions });
220
221
  }
221
- } catch {
222
+ } catch (err) {
223
+ errors.push(`${adapter.name}: ${err instanceof Error ? err.message : String(err)}`);
222
224
  }
223
225
  }
226
+ if (results.length === 0 && errors.length > 0) {
227
+ throw new T2000Error("PROTOCOL_UNAVAILABLE", `Protocol queries failed (${errors.length}/${this.lending.size}): ${errors.join("; ")}`);
228
+ }
224
229
  return results;
225
230
  }
226
231
  getLending(id) {