handle httplib.HTTPException