change error types so they are distinguishable
add test case for err values
Merge pull request #2 from daniel-garcia/feature/fixErrorTypes

change error types so they are distinguishable