added catching HTTPErrors

PR looks good to me, but is it correct to use 0.4.x version in v3 branch?

CC @treeder, @rkononov, @carimura