Note to read json regardless of error response - can define your own:
Note to read json regardless of error response - can define your own:
HttpReads[HttpResponse].map(_.json.validate[A])
or custom behaviour - define your own:
HttpReads[HttpResponse].map(response => response.status match {
case 200 => Right(response.body.json.validate[A])
case 400 => Right(response.body.json.validate[A])
case other => Left(s"Invalid status code: $other")
})