Move error handling into process_result.
Merge pull request #5 from roverdotcom/WIZ-382

WIZ-382