Provide custom error structure for parse failures

This commit is contained in:
Eike Kettner
2021-02-28 22:36:48 +01:00
parent d737da768e
commit e079ec1987
3 changed files with 70 additions and 4 deletions

View File

@ -61,7 +61,7 @@ object ItemRoutes {
val of = offset.getOrElse(0)
query match {
case Left(err) =>
BadRequest(BasicResult(false, err))
BadRequest(BasicResult(false, err.render))
case Right(sq) =>
for {
items <- backend.itemSearch.findItems(cfg.maxNoteLength)(