Report output from API on error.
Merge pull request #8 from karma0/errorhandling

Report output from API on error.