Error Cases
Stay organized with collections
Save and categorize content based on your preferences.
The following sections highlight the most common scenarios in which Mobile Data
Plan Sharing API returns an error to the caller. If the errors persist, please
reach out to mdp-support@google.com for support and share the URL being called
along with the request body.
HTTP 404 Not Found
The most common reason for an HTTP 404 error is when GTAF is unable to find the
GCM token of the user for whom a notification should be sent. This happens when
the device either did not get a chance or failed to register the CPID and the
associated GCM token with GTAF. This could also happen if the device is
registered with pre-prod instance of GTAF and the notification is being sent to
prod instance of GTAF.
To diagnose this error:
- ensure that the MDP UI is successfully loading on the device.
- ensure that path parameters and the query parameters in the call are URL
encoded.
- try both pre-prod (preprod-mobiledataplansharing.googleapis.com) and prod
endpoints (mobiledataplansharing.googleapis.com).
HTTP 400 Bad Request
This error happens when the body of the request sent to GTAF is invalid. The
most common scenarios for this are:
- updateTime in
PlanStatus is not
provided or is in the future.
- expireTime in
PlanStatus is not
provided or is in the past.
- userKey query parameter is missing.
- all the fields required for constructing a notification are not present.
Please see notification guidelines for details on how to
trigger notifications.
HTTP 409 Conflict
GTAF returns this error to the caller if the
PlanStatus in cache is
more recent (i.e., the updateTime is more recent) than the one being sent in the
request. Please check your logs to see if a
PlanStatus has been
pushed for this user.
HTTP 403 Forbidden
GTAF returns this error if the caller is not authorized to call Mobile Data Plan
Sharing API for the particular ASN being used in the URL. To diagnose this
error:
- verify that the
API
is enabled in Google cloud console API
Library.
- the service account being used for the call has been added to the ISP
portal of the carrier.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-03 UTC."],[[["\u003cp\u003eThis page lists common errors when using the Mobile Data Plan Sharing API and troubleshooting steps.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 404 errors often occur when GTAF can't find the user's GCM token, potentially due to registration issues.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 400 errors indicate an invalid request body, such as incorrect timestamps or missing fields.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 409 errors happen when the cached PlanStatus is more recent than the one in the request.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 403 errors mean the caller lacks authorization, often due to API enablement or service account issues.\u003c/p\u003e\n"]]],["The Mobile Data Plan Sharing API returns errors in specific scenarios. HTTP 404 occurs when the user's GCM token is not found. Actions to diagnose: ensure MDP UI loads, check URL encoding, and try pre-prod/prod endpoints. HTTP 400 occurs with invalid request bodies, requiring valid `updateTime` and `expireTime`, a `userKey`, and all fields needed for notifications. HTTP 409 means the cached `PlanStatus` is more recent. HTTP 403 indicates caller authorization issues; ensure the API is enabled and the service account is in the ISP portal.\n"],null,["# Error Cases\n\nThe following sections highlight the most common scenarios in which Mobile Data\nPlan Sharing API returns an error to the caller. If the errors persist, please\nreach out to [mdp-support@google.com](mailto:mdp-support@google.com) for support and share the URL being called\nalong with the request body.\n\nHTTP 404 Not Found\n------------------\n\nThe most common reason for an HTTP 404 error is when GTAF is unable to find the\nGCM token of the user for whom a notification should be sent. This happens when\nthe device either did not get a chance or failed to register the CPID and the\nassociated GCM token with GTAF. This could also happen if the device is\nregistered with pre-prod instance of GTAF and the notification is being sent to\nprod instance of GTAF.\n\nTo diagnose this error:\n\n1. ensure that the MDP UI is successfully loading on the device.\n2. ensure that path parameters and the query parameters in the call are URL encoded.\n3. try both pre-prod (preprod-mobiledataplansharing.googleapis.com) and prod endpoints (mobiledataplansharing.googleapis.com).\n\nHTTP 400 Bad Request\n--------------------\n\nThis error happens when the body of the request sent to GTAF is invalid. The\nmost common scenarios for this are:\n\n1. updateTime in [PlanStatus](/mobile-data-plan/reference/rest/v1/operators.planStatuses#PlanStatus) is not provided or is in the future.\n2. expireTime in [PlanStatus](/mobile-data-plan/reference/rest/v1/operators.planStatuses#PlanStatus) is not provided or is in the past.\n3. userKey query parameter is missing.\n4. all the fields required for constructing a notification are not present. Please see [notification guidelines](/mobile-data-plan/notifications) for details on how to trigger notifications.\n\nHTTP 409 Conflict\n-----------------\n\nGTAF returns this error to the caller if the\n[PlanStatus](/mobile-data-plan/reference/rest/v1/operators.planStatuses#PlanStatus) in cache is\nmore recent (i.e., the updateTime is more recent) than the one being sent in the\nrequest. Please check your logs to see if a\n[PlanStatus](/mobile-data-plan/reference/rest/v1/operators.planStatuses#PlanStatus) has been\npushed for this user.\n\nHTTP 403 Forbidden\n------------------\n\nGTAF returns this error if the caller is not authorized to call Mobile Data Plan\nSharing API for the particular ASN being used in the URL. To diagnose this\nerror:\n\n1. verify that the [API](https://console.cloud.google.com/apis/library/mobiledataplansharing.googleapis.com/) is enabled in Google cloud console [API\n Library](https://console.developers.google.com/apis/library).\n2. the service account being used for the call has been added to the [ISP\n portal](https://isp.google.com) of the carrier."]]