エラーのシナリオ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
以下のセクションでは、Mobile Data Plan Sharing API が呼び出し元にエラーを返す最も一般的なシナリオについて説明します。エラーが解決しない場合は、mdp-support@google.com に連絡してサポート依頼を行い、呼び出される URL をリクエスト本文とともに伝えてください。
HTTP 404 が見つかりませんでした
HTTP 404 エラーの最も一般的な理由は、GTAF が通知の送信先となるユーザーの GCM トークンを見つけられないことです。これは、デバイスが CPID および関連する GCM トークンを GTAF に登録できなかったか、登録に失敗した場合に発生します。これは、デバイスが GTAF の本番前インスタンスに登録されていて、通知が GTAF の本番環境インスタンスに送信された場合にも発生することがあります。
このエラーを診断する手順は次のとおりです。
- MDP UI がデバイスに正常に読み込まれることを確認します。
- 呼び出し内のパスパラメータとクエリ パラメータを URL エンコードします。
- 本番前(preprod-mobiledataplansharing.googleapis.com)と本番環境エンドポイント(mobiledataplansharing.googleapis.com)の両方を試してください。
HTTP 400 不正なリクエスト
このエラーは、GTAF に送信されたリクエストの本文が無効な場合に発生します。最も一般的なシナリオは次のとおりです。
- PlanStatus の updateTime が指定されていないか、将来である。
- PlanStatus の expireTime が指定されていないか、過去である。
- userKey クエリ パラメータがありません。
- 通知の作成に必要なすべてのフィールドが存在しない。
通知をトリガーする方法について詳しくは、通知のガイドラインをご覧ください。
HTTP 409 の競合
キャッシュ内の PlanStatus がリクエストで送信されたものよりも新しい場合(つまり、updateTime が新しい場合)、GTAF はこのエラーを呼び出し元に返します。ログを確認して、このユーザーに対して PlanStatus が push されているかどうかを確認してください。
HTTP 403(アクセス拒否)
呼び出し元が URL で使用されている特定の ASN に Mobile Data Plan Sharing API を呼び出す権限がない場合、GTAF からこのエラーが返されます。このエラーを診断するには、次の手順を行います。
1. Google Cloud Console の API ライブラリで API が有効になっていることを確認します。1. 通話に使用しているサービス アカウントが、携帯通信会社の ISP ポータルに追加されている。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2022-09-26 UTC。
[[["わかりやすい","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 UTC。"],[[["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"]]