Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dApp: Handle Relayer's errors #284

Closed
Tracked by #146
nkuba opened this issue Mar 1, 2024 · 1 comment
Closed
Tracked by #146

dApp: Handle Relayer's errors #284

nkuba opened this issue Mar 1, 2024 · 1 comment

Comments

@nkuba
Copy link
Member

nkuba commented Mar 1, 2024

When a POST request is sent to the Relayer it may return an error in the response:

// TODO: Catch and handle errors + sentry.
const response = await axios.post<{ result: string }>(
this.#defenderWebhookUrl,
{
fundingTx,
reveal,
staker: `0x${staker.identifierHex}`,
referral,
},
)
// Defender returns result as string so we need to parse it.
const { txHash } = JSON.parse(response.data.result) as { txHash: string }

We need to handle such situations, by introducing backoff retries, ensuring the error is logged in the logs and notification is sent to Sentry.

@r-czajkowski
Copy link
Contributor

I think we can close this issue since we use the tBTC API instead of Open Zeppelin Defender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants