Skip to content

Relayer: unmarshal only when the txnReceipt is not empty#328

Merged
pkieltyka merged 1 commit intomasterfrom
relayer_fix_empty_receipt
Dec 1, 2025
Merged

Relayer: unmarshal only when the txnReceipt is not empty#328
pkieltyka merged 1 commit intomasterfrom
relayer_fix_empty_receipt

Conversation

@david-littlefarmer
Copy link
Contributor

metaTxnReceipt.TxnReceipt may sometimes be an empty string.
To avoid the unexpected end of JSON input error, we only unmarshal when the string is non-empty.

Or is this an unexpected case that we should treat as an error?

@pkieltyka
Copy link
Member

thanks for the PR, this looks right, as sometimes it can be empty, its true for instance if we didn't find the txn receipt object because of a timeout, etc.

@david-littlefarmer david-littlefarmer marked this pull request as ready for review December 1, 2025 12:28
@pkieltyka pkieltyka merged commit 6a64342 into master Dec 1, 2025
3 of 4 checks passed
@pkieltyka pkieltyka deleted the relayer_fix_empty_receipt branch December 1, 2025 13:14
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @david-littlefarmer 👍

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.

3 participants