Adding an additional check for http errors when communicating with Opal