return Error as errors, not strings
Merge pull request #3 from danmilon/fix-error-handling

make errors returned actual Errors, not strings