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 committed Feb 25, 2021
1 parent 4cec037 commit 92b6054
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 @@ -400,7 +400,7 @@ func ImportChain(ctx context.Context, r repo.Repo, fname string, snapshot bool)
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 92b6054

Please sign in to comment.