想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
非同步錯誤
由於 ExperimentService
含有一些非同步作業,因此與這些作業相關的錯誤擷取機制與其他同步處理作業不同。
使用這個錯誤回報機制的非同步作業如下:
針對這些方法,API 會傳回長時間執行的作業,可用於要求非同步作業的狀態詳細資料。完成後,長時間執行的作業將填入 error
和 response
欄位。在 Google Ads API 中,這項作業一律會為 response
填入 Empty
值,而 error
表示系統會從其他 API 呼叫中擷取完整的錯誤清單。
如果在長時間執行的作業中傳回完整的錯誤清單,而未追蹤非同步進度,則錯誤可能會遺失,且回應的簡單回應要求可能會比原先的預期還大。因此,長時間執行的作業只會指出有錯誤,如要擷取特定錯誤,您必須使用 API 端點。
如果是與任何以實驗為基礎的長時間執行作業相關的錯誤,請使用 ExperimentService.ListExperimentAsyncErrors
。
傳入實驗的資源名稱和網頁大小,然後把結果和所有其他 Google Ads API 查詢一樣。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-04 (世界標準時間)。
[null,null,["上次更新時間:2025-03-04 (世界標準時間)。"],[[["The `ExperimentService` uses a different error reporting mechanism for its asynchronous operations like scheduling and promoting experiments."],["Asynchronous operations return a longrunning operation; check its `error` field to see if errors occurred during the operation."],["To retrieve the full list of errors for an asynchronous experiment operation, use the `ExperimentService.ListExperimentAsyncErrors` method with the experiment's resource name."],["Instead of including all errors in the initial response, this approach prevents potential data loss and keeps response sizes manageable."]]],[]]