Thanks!!
I finally realized this
val route = pathPrefix("auth") {
path("signIn") {
post {
entity(as[LoginPassword]) { loginPassword =>
val token = signIn(loginPassword.login, loginPassword.password)
val response = token.map(_ match {
ca
Don’t return null in scala code, that’s very not-scala-style.
Instead you could return empty things, or best rather even to throw an
exception and make your handler
https://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/exception-handling.html
make
it into a not found response.
--
Chee
Hi! , I have a Route where if a function finds a data in the DB responds a
value of type Json,
when it does not find the value it responds with null and therefore the
complete responds null.
I want to validate this so that it does not respond null, but a String that
says: "Not found", this is