Raise custom exceptions and pass http code and body