Pathmatchers in Akka HTTP enable the programmer to extract values from the URL.
Errors are presented to the user of the core and resolver API as JSON objects, this is done semi-automatically by the Circe library.
Errors are presented to the user of the core and resolver API as JSON objects, this is done semi-automatically by the Circe library.
When validation, JSON deserialisation fail or a duplicate entry occures in the database, we complete the request by returning the correct status code and JSON error message (see Errors.scala).
Pathmatchers in Akka HTTP enable the programmer to extract values from the URL. Here we extend the pathmatching facility to do validation using the predicate of our refined types. If validation fails, reject the request -- see Handlers.scala for how this is handled.
https://github.com/fthomas/refined
http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala.html