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-23 15:20:36 -05:00
parent 4cec0375b9
commit 92b605466f
No known key found for this signature in database
GPG Key ID: 5F92FFE5632AC57B

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