Check HTTP response codes when retrieving images
If the error is 4xx or 5xx do not try to parse HTML error pages or error responses at all.