[VOL-4119] voltha-lib-go incorrect argument handling for onu sw upgrade
Change-Id: Ic0b7120de69cb3d93e014709f003fd3816bdcf0c
diff --git a/VERSION b/VERSION
index e91d9be..eda862a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.3.3
+4.3.4
diff --git a/pkg/adapters/common/request_handler.go b/pkg/adapters/common/request_handler.go
index 020e799..b6cf1c0 100644
--- a/pkg/adapters/common/request_handler.go
+++ b/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
}