Added some error handling logic
Unit testing
better test
Merge pull request #1 from opentable/VX-449

Vx 449