Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/solid-flowers-see.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@relayprotocol/relay-kit-hooks': patch
'@relayprotocol/relay-sdk': patch
---

Fix async errors not caught
8 changes: 5 additions & 3 deletions packages/hooks/src/hooks/useExecutionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ export default function (
queryFn: () => {
onRequest?.()
const promise = queryExecutionStatus(client?.baseApiUrl, options)
promise.then((response: any) => {
onResponse?.(response)
})
promise
.then((response: any) => {
onResponse?.(response)
})
.catch(() => {})
return promise
},
enabled: client !== undefined && options !== undefined,
Expand Down
12 changes: 12 additions & 0 deletions packages/sdk/src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ const postSameChainTransactionToSolver = async ({
LogLevel.Verbose
)
})
.catch((e) => {
getClient()?.log(
['Failed to post same chain transaction to solver', e],
LogLevel.Warn
)
})
} catch (e) {
getClient()?.log(
['Failed to post same chain transaction to solver', e],
Expand Down Expand Up @@ -628,6 +634,12 @@ const postTransactionToSolver = async ({
LogLevel.Verbose
)
})
.catch((e) => {
getClient()?.log(
['Failed to post transaction to solver', e],
LogLevel.Warn
)
})
} catch (e) {
getClient()?.log(
['Failed to post transaction to solver', e],
Expand Down