@@ -14,7 +14,6 @@ import (
14
14
"github.com/bmc-toolbox/bmclib/v2/constants"
15
15
brrs "github.com/bmc-toolbox/bmclib/v2/errors"
16
16
"github.com/bmc-toolbox/common"
17
- "github.com/pkg/errors"
18
17
)
19
18
20
19
// API session setup response payload
@@ -229,7 +228,7 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, file *
229
228
var size int64
230
229
finfo , err := file .Stat ()
231
230
if err != nil {
232
- return errors . Wrap ( err , "unable to determine file size" )
231
+ return fmt . Errorf ( "unable to determine file size: %w" , err )
233
232
}
234
233
235
234
size = finfo .Size ()
@@ -558,7 +557,7 @@ func (a *ASRockRack) httpsLogin(ctx context.Context) error {
558
557
559
558
resp , statusCode , err := a .queryHTTPS (ctx , urlEndpoint , "POST" , bytes .NewReader (payload ), headers , 0 )
560
559
if err != nil {
561
- return errors . Wrap ( err , "logging in" )
560
+ return fmt . Errorf ( "logging in: %w" , err )
562
561
}
563
562
564
563
if statusCode == 401 {
@@ -568,7 +567,7 @@ func (a *ASRockRack) httpsLogin(ctx context.Context) error {
568
567
// Unmarshal login session
569
568
err = json .Unmarshal (resp , a .loginSession )
570
569
if err != nil {
571
- return errors . Wrap ( err , "unmarshalling response payload" )
570
+ return fmt . Errorf ( "unmarshalling response payload: %w" , err )
572
571
}
573
572
574
573
return nil
@@ -578,7 +577,7 @@ func (a *ASRockRack) httpsLogin(ctx context.Context) error {
578
577
func (a * ASRockRack ) httpsLogout (ctx context.Context ) error {
579
578
_ , statusCode , err := a .queryHTTPS (ctx , "api/session" , "DELETE" , nil , nil , 0 )
580
579
if err != nil {
581
- return errors . Wrap ( err , "logging out" )
580
+ return fmt . Errorf ( "logging out: %w" , err )
582
581
}
583
582
584
583
if statusCode != http .StatusOK {
0 commit comments