Add better error handling
Fix specs
Merge pull request #34 from scienceexchange/error_handling

Error handling