Raise custom exceptions and pass http code and body
Add JSON encoding to exception message
Merge pull request #1 from darrennix/master

Raise custom exceptions and pass http code and body