carloea2 commented on code in PR #8136:
URL: https://github.com/apache/texera/pull/8136#discussion_r3897070954
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -418,7 +418,9 @@ class HubResource {
@QueryParam("uid") uid: Integer,
@QueryParam("limit") limit: Integer
): java.util.Map[String, java.util.List[DashboardClickableFileEntry]] = {
- val tableSet = EntityTables(entityType)
+ val tableSet = EntityTables(
+ Option(entityType).getOrElse(throw new BadRequestException("entityType
is required"))
Review Comment:
Covered by #8134.
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -418,7 +418,9 @@ class HubResource {
@QueryParam("uid") uid: Integer,
@QueryParam("limit") limit: Integer
): java.util.Map[String, java.util.List[DashboardClickableFileEntry]] = {
- val tableSet = EntityTables(entityType)
+ val tableSet = EntityTables(
+ Option(entityType).getOrElse(throw new BadRequestException("entityType
is required"))
Review Comment:
Changed this to the existing guard clause style.
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -418,7 +418,9 @@ class HubResource {
@QueryParam("uid") uid: Integer,
@QueryParam("limit") limit: Integer
): java.util.Map[String, java.util.List[DashboardClickableFileEntry]] = {
- val tableSet = EntityTables(entityType)
+ val tableSet = EntityTables(
+ Option(entityType).getOrElse(throw new BadRequestException("entityType
is required"))
Review Comment:
Documented BadRequestException.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]