0

I'm trying to complete http request using RequestContext.complete and Promise[RouteResult], but i'm getting an error: org.json4s.package$MappingException: Can't find ScalaSig for class akka.http.scaladsl.marshalling.ToResponseMarshallable$$anon$1

Here's my code:

  def r: RequestContext
  def p: Promise[RouteResult]

      def complete(status: StatusCode, obj: => ToResponseMarshallable) = {
        val f = status match {
          case AkkaStatusCodes.NoContent =>
            r.complete(status, None)
          case _ =>
            r.complete(status, obj)
        }
        f.onComplete(p.complete(_))
        stop(self)
      }
HudsonHornet
  • 89
  • 1
  • 9
  • Your code snippet is not reproducible. Json4s uses parsing ScalaSigs. This can be a bug like https://stackoverflow.com/questions/36143776/cant-find-scalasig-for-class-java-lang-object or something else. – Dmytro Mitin Oct 02 '20 at 17:13
  • BEWARE: [Json4s is vulnerable under DoS/DoW attacks](https://github.com/json4s/json4s/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+denial)! – Andriy Plokhotnyuk Oct 22 '20 at 06:17

0 Answers0