Skip to content

Commit

Permalink
Improve error message with importing a chain
Browse files Browse the repository at this point in the history
Without this commit the error message does not provide much value as it
lacks context.
  • Loading branch information
ghoneycutt authored and codefather-filestar committed Jun 23, 2021
1 parent 0a837c0 commit 6bb2542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/lotus/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func ImportChain(r repo.Repo, fname string, snapshot bool) (err error) {
defer resp.Body.Close() //nolint:errcheck

if resp.StatusCode != http.StatusOK {
return xerrors.Errorf("non-200 response: %d", resp.StatusCode)
return xerrors.Errorf("fetching chain CAR failed with non-200 response: %d", resp.StatusCode)
}

rd = resp.Body
Expand Down

0 comments on commit 6bb2542

Please sign in to comment.