fix(region): make parseDeviceInfo error clear (#21326)

This commit is contained in:
Zexi Li
2024-09-28 18:35:22 +08:00
committed by GitHub
parent e005610391
commit ed6063d2dd
+1 -1
View File
@@ -484,7 +484,7 @@ func (manager *SIsolatedDeviceManager) parseDeviceInfo(userCred mcclient.TokenCr
if len(devId) == 0 {
if matchDev == nil {
return nil, fmt.Errorf("Isolated device info not contains either deviceID or model name")
return nil, httperrors.NewNotFoundError("Not found matched device by model: %q, dev_type: %q", devConfig.Model, devConfig.DevType)
}
devConfig.Model = matchDev.Model
if len(devVendor) > 0 {