fixed test failure due to `reason` not always being present on HTTPError objects