Improve error message with importing a chain

Without this commit the error message does not provide much value as it
lacks context.
This commit is contained in:
Garrett Honeycutt
2021-02-24 19:29:29 -05:00
parent 4cec0375b9
commit 92b605466f
+1 -1
View File
@@ -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