Enhance HTTP error handling

See easybib/issues#1039

Tag 0.5.9