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

fix: return 400 if transaction logs not found #780

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Nov 25, 2024

PR-Codex overview

This PR enhances error handling in the getTransactionLogs function by introducing a try-catch block for fetching the transaction receipt. It also updates the error message for clarity when a transaction has not been mined.

Detailed summary

  • Added import of TransactionReceipt from thirdweb/transaction.
  • Changed the declaration of transactionReceipt to include TransactionReceipt | undefined.
  • Wrapped the receipt fetching logic in a try-catch block.
  • Updated the error message to "Unable to get transaction receipt. The transaction may not have been mined yet."

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@arcoraven arcoraven merged commit d25788e into main Nov 25, 2024
5 checks passed
@arcoraven arcoraven deleted the ph/transactionLog400 branch November 25, 2024 13:41
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

Successfully merging this pull request may close these issues.

1 participant