Skip to content

Commit

Permalink
providers/redfish/tasks: returns TaksNotFound on 404
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Sep 20, 2023
1 parent 44c2961 commit ce8aca3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions providers/redfish/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ func (c *Conn) GetTask(taskID string) (task *gofishrf.Task, err error) {
if err != nil {
return nil, err
}
if resp.StatusCode == 404 {
return nil, errors.Wrap(bmclibErrs.ErrTaskNotFound, "task with ID not found: "+taskID)
}
if resp.StatusCode != 200 {
err = errors.Wrap(
bmclibErrs.ErrFirmwareInstallStatus,
Expand Down

0 comments on commit ce8aca3

Please sign in to comment.