Skip to content

Commit

Permalink
filtered/advancedSearch: send badRequest for IllegalArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
handymenny committed Feb 6, 2024
1 parent d518c69 commit d34b9bb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ class JavalinApp {
val result = index.filterByQuery(request, store)
ctx.json(result)
} catch (ex: Exception) {
ctx.internalError()
if (ex is IllegalArgumentException) {
ctx.badRequest()
} else {
ctx.internalError()
}
}
}
}
Expand Down

0 comments on commit d34b9bb

Please sign in to comment.