錯誤情境
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
以下各節說明行動數據方案分享 API 在向呼叫端傳回錯誤最常見的情況。如果錯誤持續發生,請與 mdp-support@google.com 聯絡,取得相關支援,並將要求網址與要求主體分享。
找不到 HTTP 404
HTTP 404 錯誤最常見的原因是 GTAF 找不到應通知的使用者的 GCM 權杖。如果裝置沒有取得機會,或無法向 GTAF 註冊 CPID 和相關的 GCM 權杖,就會發生這種情況。如果裝置已透過正式生產前的 GTAF 執行個體註冊,並將通知傳送至 GTAF 的實際工作環境執行個體,也可能會發生這種情況。
如何診斷這個錯誤:
- 確認 MDP UI 已成功在裝置上載入。
- 確保呼叫的路徑參數和查詢參數進行網址編碼。
- 請嘗試 pre-prod (preprod-mobiledataplansharing.googleapis.com) 和 prod 端點 (mobiledataplansharing.googleapis.com)。
HTTP 400 錯誤的要求
傳送至 GTAF 的要求內文無效時,就會發生這個錯誤。最常見的情況如下:
- 未提供 PlanStatus 中的 updateTime。
- 未提供 PlanStatus 中的 timeoutTime,
- 缺少 userKey 查詢參數。
- 建構通知所需的所有欄位不存在。如要進一步瞭解如何觸發通知,請參閱通知指南。
HTTP 409 衝突
如果快取中的 PlanStatus 比要求中傳送更新的 (亦即 updateTime 較新),GTAF 會將此錯誤傳回呼叫端。請檢查您的記錄,看看是否已推送這位使用者的 PlanStatus。
HTTP 403 禁止
如果呼叫端沒有針對網址中使用的特定 ASN 呼叫 Mobile Data Plan Shared API,GTAF 會傳回此錯誤。如何診斷這個錯誤:
1. 確認 Google Cloud Console 的 API 程式庫中已啟用 API。1. 用於通話的服務帳戶已新增到電信業者的 ISP 入口網站。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-09-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2022-09-26 (世界標準時間)。"],[[["This page outlines common errors when using the Mobile Data Plan Sharing API, such as HTTP 404, 400, 409, and 403 errors, and provides troubleshooting steps."],["HTTP 404 errors typically occur when GTAF cannot find the user's GCM token, potentially due to device registration issues or using the wrong GTAF instance."],["HTTP 400 errors indicate an invalid request body, often caused by incorrect timestamps or missing parameters in the PlanStatus."],["HTTP 409 errors suggest that a more recent PlanStatus already exists in the cache, requiring a review of previous updates."],["HTTP 403 errors arise from authorization issues, necessitating verification of API enablement and service account permissions within the carrier's ISP portal."]]],["The Mobile Data Plan Sharing API returns errors in specific scenarios. A 404 error indicates a missing GCM token; solutions include ensuring the UI loads, URL encoding parameters, and checking both endpoints. A 400 error signals an invalid request body, often due to incorrect `updateTime`, `expireTime`, missing `userKey`, or incomplete notification details. A 409 error arises from sending outdated `PlanStatus`, and a 403 error occurs if authorization is lacking; checking API enablement and service account status is advised. For persistent errors, contact mdp-support@google.com.\n"]]