diff --git a/providers/redfish/firmware.go b/providers/redfish/firmware.go index 258c2289..c3486c44 100644 --- a/providers/redfish/firmware.go +++ b/providers/redfish/firmware.go @@ -145,7 +145,11 @@ func TaskIDFromLocationURI(uri string) (taskID string, err error) { // OpenBMC returns a monitor URL in Location // Location: /redfish/v1/TaskService/Tasks/12/Monitor splits := strings.Split(uri, "/") - taskID = splits[5] + if len(splits) == 6 { + taskID = splits[5] + } else { + taskID = "" + } } if taskID == "" {