From 92b605466fa2b3e6160afbfb296093fcb737b2d1 Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Tue, 23 Feb 2021 15:20:36 -0500 Subject: [PATCH] Improve error message with importing a chain Without this commit the error message does not provide much value as it lacks context. --- cmd/lotus/daemon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index 4226c33f7..e8587750c 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -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