Hi,
When I’m doing a filter such as that one :
router.get("api", "acronyms", "search") { req -> Future<[Acronym]> in guard let searchTerm = req.query[String.self, at: "term"] else { throw Abort(.badRequest) } return try Acronym.query(on: req).group(.or) { or in try or.filter(\.short == searchTerm) try or.filter(\.long == searchTerm) }.all() }
I got an alert message aligned with the “try or.filter” line saying that “No calls to throwing functions occur within ‘try’ expression”. It stills working, I’m just wondering what causes the error ?