Skip to content

Commit

Permalink
Fix/louis/unhandled rejection timeout (#79)
Browse files Browse the repository at this point in the history
* Feat/louis/improve logging (#59)

* fix: blockManager: improve error handling

* fix: reliableWebsocketProvider: error -> warn on no block for 20s

* fix: reliableProvider: wrap error into a successful

* fix: changelog: update

---------

Co-authored-by: Mangrove Automation Bot <[email protected]>
  • Loading branch information
Louis-Amas and mangrove-automation authored Aug 2, 2023
1 parent 351371e commit 5b983a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Next version

- reliableProvider: fix unhandled rejection problem

# 1.1.28

- reliableProvider: add timeout to getLogs
Expand Down
5 changes: 5 additions & 0 deletions src/providers/reliableProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ abstract class ReliableProvider {
} finally {
clearTimeout(timeoutId);
}
}).catch((err: Error) => {
return Promise.resolve({
error: err.message,
ok: undefined,
});
});
}
}
Expand Down

0 comments on commit 5b983a8

Please sign in to comment.