Guard against e, e.response, and e.response.code being nil.