[VOL-4119] voltha-core incorrect args for Get-Onu-Image
Change-Id: Ibe99ab3956c1427584d5ba4f77693458342ad111
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/request_handler.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/request_handler.go
index 020e799..b6cf1c0 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/request_handler.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/adapters/common/request_handler.go
@@ -852,8 +852,6 @@
logger.Warnw(ctx, "cannot-unmarshal-device", log.Fields{"error": err})
return nil, err
}
- default:
- return nil, errors.New("invalid argument")
}
}
return &deviceDownloadImageReq, nil
@@ -875,8 +873,6 @@
logger.Warnw(ctx, "cannot-unmarshal-device", log.Fields{"error": err})
return nil, err
}
- default:
- return nil, errors.New("invalid argument")
}
}
return &deviceImageReq, nil
@@ -894,10 +890,13 @@
logger.Warnw(ctx, "cannot-unmarshal-device", log.Fields{"error": err})
return "", err
}
- default:
- return "", errors.New("invalid argument")
}
}
+
+ if deviceId.Val == "" {
+ return "", errors.New("invalid argument")
+ }
+
return deviceId.Val, nil
}