hseeberger / akka-http-json

Integrate some of the best JSON libs in Scala with Akka HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

could not find implicit value for parameter um

msilb opened this issue · comments

Hi,

I am using akka-http-circe and getting the following error:

Error:(53, 83) could not find implicit value for parameter um: akka.http.scaladsl.unmarshalling.Unmarshaller[akka.http.scaladsl.model.ResponseEntity,com.msilb.scalanda.restapi.Response.AccountDetailsResponse]
    getWithQueryParams(s"accounts/$accountId").flatMap(r => Unmarshal(r.entity).to[AccountDetailsResponse])

Here is the code excerpt where it fails:

import de.heikoseeberger.akkahttpcirce.CirceSupport._

def getAccountDetails(accountId: AccountId): Future[AccountDetailsResponse] = {
  import io.circe.generic.auto._
  getWithQueryParams(s"accounts/$accountId").flatMap(r => Unmarshal(r.entity).to[AccountDetailsResponse])
}

AccountDetailsResponse is a case class which contains nested case classes and case objects. I am thinking circe fails to find implicit decoders for the given domain model but unfortunately the error message does not tell me which value it fails to decode, otherwise I could provide it manually. Is there any way to add this information to the error message?

Sorry, but this library can't influence the error messages of the Scala compiler.