From 646749bcabc8b9a971187d359db48e3b1a38ba18 Mon Sep 17 00:00:00 2001 From: Morgan Kuphal Date: Wed, 27 Sep 2023 11:30:09 -0500 Subject: [PATCH] improve timeout error msg --- .changeset/serious-llamas-unite.md | 5 +++++ src/SubscriptionManager.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/serious-llamas-unite.md diff --git a/.changeset/serious-llamas-unite.md b/.changeset/serious-llamas-unite.md new file mode 100644 index 0000000..b3f539a --- /dev/null +++ b/.changeset/serious-llamas-unite.md @@ -0,0 +1,5 @@ +--- +'@chainlink/functions-toolkit': patch +--- + +Improve log msg for timeouts diff --git a/src/SubscriptionManager.ts b/src/SubscriptionManager.ts index a8a9c30..d0f2e1c 100644 --- a/src/SubscriptionManager.ts +++ b/src/SubscriptionManager.ts @@ -464,7 +464,9 @@ export class SubscriptionManager { : await this.functionsRouter.timeoutRequests(requestCommitments) return timeoutTx.wait(txOptions?.confirmations) } catch (error) { - throw Error(`Failed to timeout requests:\n${error}`) + throw Error( + `Failed to timeout requests. Ensure commitments are correct, requests have not been fulfilled and were sent more than 5 minutes ago:\n${error}`, + ) } }