Yicong-Huang commented on code in PR #8398:
URL: https://github.com/apache/texera/pull/8398#discussion_r3939041724
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala:
##########
@@ -848,6 +848,9 @@ class WorkflowResource extends LazyLogging {
@Path("/type/{wid}")
def getWorkflowType(@PathParam("wid") wid: Integer): String = {
val workflow: Workflow = workflowDao.fetchOneByWid(wid)
+ if (workflow == null) {
+ throw new NotFoundException(s"Workflow with id $wid not found")
Review Comment:
Yes, keep it scoped to #8140. I checked before answering: #8140 is open,
touches these same two files, and closes #8139, so the guard is tracked and
landing on its own branch. Withdrawing this as a must-fix on your PR — nothing
here needs to change.
##########
amber/src/test/scala/org/apache/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala:
##########
@@ -947,6 +947,12 @@ class WorkflowResourceSpec
assert(sizes.get(wid) == content.length)
}
+ it should "return NotFoundException for a missing workflow type" in {
Review Comment:
Verified: line 950 now reads `it should "throw NotFoundException for a
missing workflow type"`, matching the sibling at 1059.
--
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]