[英]Using rescue block to handle response code errors. Instead of next, how can I output the status code in output instead of skipping it?
我有一些代碼可以通過完全聯系提出 API 請求,以解析公司名稱列表的域,並在 csv 表中解析這些域。 我發現代碼在遇到 200 或 202 以外的響應代碼時就會終止。 我寫了以下救援塊: 問題是,我不知道如何在 output 中仍然包含跳過的公司名稱(由於錯誤的響應代碼)。 我得到了成功呼叫的列 ...