mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Enforce log.WithError(err) static analysis and fix all violations (#11163)
* Use log.WithError static analysis from #11143 and fix all violations * Fix another log violation after pulling from develop * Update beacon-chain/sync/pending_blocks_queue.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * @potuz feedback * Copy paste fail * fix tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Potuz <potuz@prysmaticlabs.com>
This commit is contained in:
@@ -218,6 +218,6 @@ func unmarshalSignatureResponse(responseBody io.ReadCloser) (bls.Signature, erro
|
||||
// closeBody a utility method to wrap an error for closing
|
||||
func closeBody(body io.Closer) {
|
||||
if err := body.Close(); err != nil {
|
||||
log.Errorf("could not close response body: %v", err)
|
||||
log.WithError(err).Error("could not close response body")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ func UnmarshalOptionsFile(r io.ReadCloser) (*KeymanagerOpts, error) {
|
||||
}
|
||||
defer func() {
|
||||
if err := r.Close(); err != nil {
|
||||
log.Errorf("Could not close keymanager config file: %v", err)
|
||||
log.WithError(err).Error("Could not close keymanager config file")
|
||||
}
|
||||
}()
|
||||
opts := &KeymanagerOpts{
|
||||
|
||||
Reference in New Issue
Block a user