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(api/gateway): Handle err from tx properly to avoid panic #2393

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

renaynay
Copy link
Member

Fixes a panic that can occur if txResp is nil and also returns actual error in the case of nil txResp.

Reported by @tuxcanfly

@renaynay renaynay self-assigned this Jun 23, 2023
@renaynay renaynay added the kind:fix Attached to bug-fixing PRs label Jun 23, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2393 (7361749) into main (f32c903) will decrease coverage by 0.16%.
The diff coverage is 37.50%.

@@            Coverage Diff             @@
##             main    #2393      +/-   ##
==========================================
- Coverage   50.74%   50.58%   -0.16%     
==========================================
  Files         157      157              
  Lines        9925     9925              
==========================================
- Hits         5036     5021      -15     
- Misses       4445     4459      +14     
- Partials      444      445       +1     
Impacted Files Coverage Δ
api/gateway/state.go 9.04% <37.50%> (-0.51%) ⬇️

... and 4 files with indirect coverage changes

@renaynay renaynay added the area:api Related to celestia-node API label Jun 23, 2023
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

Good bad request usage.
LGTM, Thank you!

@Wondertan Wondertan added this pull request to the merge queue Jun 23, 2023
Merged via the queue into celestiaorg:main with commit 8b28ad7 Jun 23, 2023
@Wondertan Wondertan deleted the state-fix branch June 23, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Related to celestia-node API kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants