codingteam / loglist

Reincarnation of the famous service
https://loglist.xyz/
MIT License
7 stars 4 forks source link

NullPointerException when fetching the quotes through the API #235

Closed ForNeVeR closed 3 years ago

ForNeVeR commented 3 years ago

When fetching the quotes through the API (e.g. https://loglist.xyz/api/quote/list?limit=10&page=1&filter=none&order=time), loglist shows an error page. Here's an excerpt from the logs:

play.api.UnexpectedException: Unexpected exception[NullPointerException: null]
        at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:355)
        at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:261)
        at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:429)
        at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:421)
        at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:453)
        at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56)
        at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
        at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93)
Caused by: java.lang.NullPointerException: null
        at io.circe.Printer$PrintingFolder.onString(Printer.scala:320)
        at io.circe.Printer$PrintingFolder.onString(Printer.scala:303)
        at io.circe.Json$JString.foldWith(Json.scala:359)
        at io.circe.JsonObject$LinkedHashMapJsonObject.appendToFolder(JsonObject.scala:343)
        at io.circe.Printer$PrintingFolder.onObject(Printer.scala:370)
        at io.circe.Printer$PrintingFolder.onObject(Printer.scala:303)
        at io.circe.Json$JObject.foldWith(Json.scala:421)
        at io.circe.Printer$PrintingFolder.onArray(Printer.scala:356)
        at io.circe.Printer$PrintingFolder.onArray(Printer.scala:303)
        at io.circe.Json$JArray.foldWith(Json.scala:390)

(which, interestingly enough, doesn't even refer to our code at all)

Need to investigate.