add tests for error handling
Merge pull request #6 from goodeggs/error-tests

add tests for error handling