scalacenter / scaladex

The Scala Package Index
https://index.scala-lang.org
BSD 3-Clause "New" or "Revised" License
201 stars 76 forks source link

Stack trace is printed when some exception is thrown on scaladex #623

Open oswaldo opened 4 years ago

oswaldo commented 4 years ago

Just saw an exception that happened for a few minutes and now is ok again.

Still, I'm writing this as a suggestion that maybe there should be some nice looking 500 "we are working on it" page instead of the output I got below clicking on any artifact link:


    at org.json4s.native.JsonParser$.parse(JsonParser.scala:134)
    at org.json4s.native.JsonParser$.parse(JsonParser.scala:71)
    at org.json4s.native.JsonParser$.parse(JsonParser.scala:52)
    at org.json4s.native.Serialization$.read(Serialization.scala:71)
    at org.json4s.Serialization.read(Serialization.scala:30)
    at org.json4s.Serialization.read$(Serialization.scala:30)
    at org.json4s.native.Serialization$.read(Serialization.scala:32)
    at ch.epfl.scala.index.data.github.GithubReader$.read(GithubReader.scala:283)
    at ch.epfl.scala.index.data.github.GithubReader$.movedRepositories(GithubReader.scala:251)
    at ch.epfl.scala.index.server.routes.ProjectPages.<init>(ProjectPages.scala:188)
    at ch.epfl.scala.index.server.Server$.$anonfun$main$1(Server.scala:59)
    at akka.http.scaladsl.server.Directive$.$anonfun$addByNameNullaryApply$2(Directive.scala:134)
    at akka.http.scaladsl.server.Directive$.$anonfun$Empty$1(Directive.scala:120)
    at akka.http.scaladsl.server.Directive$$anon$1.tapply(Directive.scala:115)
    at akka.http.scaladsl.server.Directive.$anonfun$tflatMap$2(Directive.scala:69)
    at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:154)
    at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$2(RouteConcatenation.scala:47)
    at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)
    at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)
    at akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26)
    at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44)
    at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$2(RouteConcatenation.scala:47)
    at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)
    at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)
    at akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26)
    at akka.http.scaladsl.server.RouteConcatenation$RouteWithConcatenation.$anonfun$$tilde$1(RouteConcatenation.scala:44)
    at akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleExceptions$2(ExecutionDirectives.scala:32)
    at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:67)
    at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:154)
    at akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleExceptions$2(ExecutionDirectives.scala:32)
    at akka.http.scaladsl.server.Route$.$anonfun$asyncHandler$1(Route.scala:79)
    at akka.stream.impl.fusing.MapAsync$$anon$25.onPush(Ops.scala:1194)
    at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:519)
    at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:482)
    at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)
    at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585)
    at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:469)
    at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:560)
    at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:742)
    at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:757)
    at akka.actor.Actor.aroundReceive(Actor.scala:517)
    at akka.actor.Actor.aroundReceive$(Actor.scala:515)
    at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:667)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:590)
    at akka.actor.ActorCell.invoke(ActorCell.scala:559)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
    at akka.dispatch.Mailbox.run(Mailbox.scala:224)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
    at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.NumberFormatException: Zero length BigInteger
    at java.math.BigInteger.<init>(BigInteger.java:439)
    at java.math.BigInteger.<init>(BigInteger.java:606)
    at scala.math.BigInt$.apply(BigInt.scala:80)
    at org.json4s.native.JsonParser$Parser.parseValue$1(JsonParser.scala:266)
    at org.json4s.native.JsonParser$Parser.nextToken(JsonParser.scala:320)
    at org.json4s.native.JsonParser$.$anonfun$astParser$1(JsonParser.scala:186)
    at org.json4s.native.JsonParser$.$anonfun$astParser$1$adapted(JsonParser.scala:143)
    at org.json4s.native.JsonParser$.parse(JsonParser.scala:131)
    ... 51 more```
adpi2 commented 4 years ago

Thank you @oswaldo for reporting this issue. A nice looking Error 500 page would be very nice to have!