Skip to content

Commit 83e61c8

Browse files
committed
fix: throw error on internal error from score-api
1 parent 87bb640 commit 83e61c8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/helpers/strategies.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ async function loadStrategies() {
2424
const res = await snapshot.utils.getJSON(URI);
2525

2626
if ('error' in res) {
27-
capture(new Error('Failed to load strategies'), {
27+
const error = new Error(
28+
`Failed to load strategies: ${res.error.message || JSON.stringify(res.error)}`
29+
);
30+
capture(error, {
2831
contexts: { input: { uri: URI }, res }
2932
});
30-
return true;
33+
throw error;
3134
}
3235

3336
const strat = Object.values(res).map((strategy: any) => ({

0 commit comments

Comments
 (0)