carloea2 commented on code in PR #8134:
URL: https://github.com/apache/texera/pull/8134#discussion_r3897069553


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -322,7 +322,10 @@ class HubResource {
   @GET
   @Path("/count")
   def getCount(@QueryParam("entityType") entityType: EntityType): Integer = {
-    val entityTables = EntityTables(entityType).base
+    val entityTables =
+      EntityTables(
+        Option(entityType).getOrElse(throw new BadRequestException("entityType 
is required"))

Review Comment:
   Covered by #8136.



##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -322,7 +322,10 @@ class HubResource {
   @GET
   @Path("/count")
   def getCount(@QueryParam("entityType") entityType: EntityType): Integer = {
-    val entityTables = EntityTables(entityType).base
+    val entityTables =
+      EntityTables(
+        Option(entityType).getOrElse(throw new BadRequestException("entityType 
is required"))

Review Comment:
   This PR covers the missing parameter path. Converter failures stay outside 
this scope.



##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -322,7 +322,10 @@ class HubResource {
   @GET
   @Path("/count")
   def getCount(@QueryParam("entityType") entityType: EntityType): Integer = {
-    val entityTables = EntityTables(entityType).base
+    val entityTables =
+      EntityTables(
+        Option(entityType).getOrElse(throw new BadRequestException("entityType 
is required"))

Review Comment:
   Changed this to a guard clause and 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]

Reply via email to