fix error handling not to itself raise an exception
Merge pull request #115 from dimagi/fix-error-handling

fix error handling not to itself raise an exception