filosganga/play-predictionio — pull request #7 by jeantil (2014-04-08 22:03:06+00:00)
Title: Add specialized exceptions to the API

Three custom exceptions to replace the raw RuntimeException :
* `NoRecommendationException` when the server returns a 404 about not having recommendations
* `PredictionIOServerException` when the server encounters an internal server error (5xx HTTP status code)
* `PredictionIOClientException` for other unknown cases

I have removed the 3xx HTTP status code handling for now and intend to allow the http client to follow through redirections at least for 302, 303 and 307 it makes sense 304 should never happen though. Since I wasn't sure about the correct handling I did something simple to be improved upon.