Yicong-Huang commented on code in PR #8151:
URL: https://github.com/apache/texera/pull/8151#discussion_r3911018941
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/DashboardResource.scala:
##########
@@ -158,7 +158,7 @@ object DashboardResource {
})
case None => List()
}
- case _ => List() // Default case if the orderBy string doesn't match the
pattern
+ case _ => throw new BadRequestException(s"Unknown orderBy:
${searchQueryParams.orderBy}")
Review Comment:
The new guard is asymmetric, and the half left behind is the half that
caused #8147. `case _` now throws, but `case None => List()` at :159 still
returns an empty order list — and that arm fires when a value *inside* the
grammar fails to parse, which is the shape the issue reported.
Separately, `?orderBy=` present-but-empty is a real 200→400 change nothing
in the PR mentions. `@DefaultValue("EditTimeDesc")` at :84 applies only when
the parameter is *absent*; an empty value binds as `""` and now takes the throw
arm. Worth a line in the description, since a v1.2 deployment's REST clients
are not in this repo to check.
--
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]