Added http errors check: fail if response is not 200