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 c402b01 commit b0d7f45
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)

Check warning on line 132 in providers/redfish/tasks.go

View check run for this annotation

Codecov / codecov/patch

providers/redfish/tasks.go#L132

Added line #L132 was not covered by tests
}
if resp.StatusCode != 200 {
err = errors.Wrap(
bmclibErrs.ErrFirmwareInstallStatus,
Expand Down

0 comments on commit b0d7f45

Please sign in to comment.