catch the correct error in retry
Merge pull request #34 from maratoid/master

catch the correct error in retry