Skip to content

Commit

Permalink
fix: do not process JSON-RPC error response
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Aug 17, 2023
1 parent e73911b commit 384877d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ let consecutiveFailsCount = 0;
async function loadStrategies() {
const res = await snapshot.utils.getJSON(uri);

if (res.hasownProperty('error')) {
capture(new Error('Failed to load strategies'), { context: { uri, res } });
return true;
}

Object.values(spaces).forEach((space: any) => {
const ids = new Set<string>(space.strategies.map(strategy => strategy.name));
ids.forEach(id => {
Expand Down

0 comments on commit 384877d

Please sign in to comment.