catch ValueError in API
Merge pull request #10 from priyeshpatel/master

Catch ValueError in API