Clean up vanilla fetching errors for proper display

Results;
```
2  0  2374  good
2  0  2409  good
2  0  2282  bad (generating vanilla proof: non-200 code from http://10.224.3.83:1123/remote/vanilla/single: 'fsstat: path not found
')
2  0  2579  good
2  0  2338  good
```

This PR should change that to;
```
2  0  2374  good
2  0  2409  good
2  0  2282  bad (generating vanilla proof: non-200 code from http://10.224.3.83:1123/remote/vanilla/single: 'fsstat: path not found')
2  0  2579  good
2  0  2338  good
```
This commit is contained in:
Rob Quist 2022-04-28 14:49:46 +02:00 committed by GitHub
parent 1162b02e60
commit 562d4e0f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -827,7 +827,7 @@ func (r *Remote) GenerateSingleVanillaProof(ctx context.Context, minerID abi.Act
log.Error("response close: ", err)
}
return nil, xerrors.Errorf("non-200 code from %s: '%s'", url, string(body))
return nil, xerrors.Errorf("non-200 code from %s: '%s'", url, strings.TrimSpace(string(body)))
}
body, err := ioutil.ReadAll(resp.Body)