fixing error reporting for certain http errors