celestiaorg / go-cnc

celestia-node REST client in Go.
Apache License 2.0
15 stars 8 forks source link

client: submitpfb partial response support #59

Open walldiss opened 1 year ago

walldiss commented 1 year ago

Overview

Resolves https://github.com/celestiaorg/go-cnc/issues/58

omritoptix commented 1 year ago

as far as I can tell if an error occures the txresp is still not returned as show here and here

walldiss commented 1 year ago

@omritoptix This error handling is a bit tricky. First error here is networking client error, and if it happens, there will be no response value returned. The second error here is constructed inside client, when http code is >500. For partial responses in node we use code 206, so if code 500 is returned, there were no txresp to return.

I did a simplification of this PR, so hopefully it will get merged soon.

codecov-commenter commented 1 year ago

Codecov Report

Merging #59 (3248676) into main (ec221ef) will decrease coverage by 1.66%. The diff coverage is 16.66%.

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
- Coverage   37.14%   35.48%   -1.66%     
==========================================
  Files           3        4       +1     
  Lines         175      186      +11     
==========================================
+ Hits           65       66       +1     
- Misses         97      106       +9     
- Partials       13       14       +1     
Impacted Files Coverage Δ
types.go 0.00% <0.00%> (ø)
client.go 51.13% <40.00%> (-1.25%) :arrow_down: