Better error handling.

Now checks for errors from the Marathon client and logs them.