Skip to content

Conversation

@cnlangzi
Copy link
Contributor

Changes

Fixes

  • improved error logging when it fails to query data from sharder's apis.

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

  • 0chain:
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2022

Codecov Report

Merging #762 (62803d9) into staging (710e9f0) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@ ## staging #762 +/- ## ======================================== Coverage 23.59% 23.59% ======================================== Files 77 77 Lines 7980 7980 ======================================== Hits 1883 1883 Misses 5828 5828 Partials 269 269 
Flag Coverage Δ
Unit-Tests 23.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us.

d.UseNumber()
if err := d.Decode(&blobberChallenges); err != nil {
logging.Logger.Error("[challenge]json: ", zap.Error(err))
logging.Logger.Error("[challenge]json: ", zap.String("resp", string(retBytes)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please log the err too in case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

b := &zcncore.Blobber{}
if err := json.Unmarshal([]byte(info), b); err != nil {
cb.Error = err
cb.Error = fmt.Errorf("getBlobber:json %s", info)
Copy link
Contributor

Choose a reason for hiding this comment

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

include the err err as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@cnlangzi cnlangzi requested a review from peterlimg July 27, 2022 03:59
@cnlangzi cnlangzi merged commit ce26910 into staging Jul 27, 2022
@cnlangzi cnlangzi deleted the fix/improve_logging_challenge branch July 27, 2022 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants