गड़बड़ी कोड और अपवाद
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एपीआई से जुड़ी गड़बड़ी के रिस्पॉन्स
नीचे दी गई टेबल में उन गड़बड़ी कोड के बारे में बताया गया है जो Google Wallet API से मिल सकते हैं. इसमें, उनके संभावित वजहों, और उनके समाधानों के बारे में भी बताया गया है.
अपवाद |
मैसेज का उदाहरण |
सुझाव |
400 - BadRequestअपवाद |
अनुरोध में एक अमान्य तर्क शामिल है. अमान्य संसाधन आईडी: {1234567891234567899 - ABCD1234567}. |
टाइप, फ़ॉर्मैट, और लंबाई के लिए डेटा स्ट्रक्चर की जांच करें और सही आर्ग्युमेंट पास करें. |
403 - अनुमति से जुड़ी अनुमति न होना |
अनुमति नहीं दी गई |
पक्का करें कि सेवा खाते का सही ईमेल पता, आपके Business Pay और Wallet Console में आधिकारिक उपयोगकर्ता का हो. |
404 - NotFoundअपवाद |
वॉलेट ऑब्जेक्ट {1234567891234567899.SampleClubCardxf6a8edf-87ca-4022-a813-694cc57e9fd3} नहीं मिला. |
PATCH या PUT अनुरोध से पहले, ऑब्जेक्ट आईडी पर GET लागू करें. इससे यह पक्का किया जा सकेगा कि आपको कोई ऑब्जेक्ट अपडेट करना है और वह सबसे नया है. |
404 - IssuerClassNotFoundपर |
वॉलेट ऑब्जेक्ट क्लास {1234567891234567899.ABCD.1234567} नहीं मिली. |
अपडेट करते समय, पक्का करें कि PATCH या PUT अनुरोध से पहले, GET अनुरोध किया गया हो. इससे यह पक्का किया जा सकेगा कि आपके पास यह बताने के लिए क्लास है कि यह सबसे नई क्लास है. यह भी पक्का करें कि अनुरोध में सही पेलोड (ऑब्जेक्ट और क्लास) का इस्तेमाल सही तरीके से किया जा रहा हो. |
409 - पहले से एक अपवाद है |
वॉलेट ऑब्जेक्ट क्लास {1234567891234567899.ABCD.1234567} पहले से मौजूद है. |
एक जैसा क्लास आईडी बनाने से पहले क्लास आईडी पर GET करें. अगर संसाधन मौजूद है, तो PATCH या PUT. का इस्तेमाल करें. |
वेब-आधारित गड़बड़ी के मैसेज
अगर 'Google Wallet में जोड़ें' लिंक का इस्तेमाल करके पास की जानकारी सेव करने के दौरान कोई गड़बड़ी होती है, तो आपको गड़बड़ी का एक मैसेज दिखेगा. इससे आपको डीबग करने में मदद मिलेगी. ये मैसेज सिर्फ़ उन उपयोगकर्ताओं को दिखाए जाते हैं जिनके पास, जारी करने वाले खाते से जुड़े 'डेवलपर' या 'एडमिन' की भूमिका होती है.
यहां गड़बड़ी के मैसेज के टाइप का एक उदाहरण दिया गया है, जो दिखाया जा सकता है:
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-09-03 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-09-03 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis page explains the different error codes that may be returned by the Google Wallet API, including BadRequestException, PermissionDeniedException, NotFoundException, IssuerClassNotFoundException, and AlreadyExistsException.\u003c/p\u003e\n"],["\u003cp\u003eEach error code has an explanation for the possible causes and suggestions for solutions, focusing on data structure validation, service account authorization, object and class ID verification, and using appropriate HTTP methods like GET, PATCH, or PUT.\u003c/p\u003e\n"],["\u003cp\u003eThe table provides example error messages to help with troubleshooting, along with links to relevant documentation for further assistance.\u003c/p\u003e\n"],["\u003cp\u003eFor 'Add to Google Wallet' links, web-based error messages are displayed for users with 'Developer' or 'Admin' roles to assist with debugging, offering insights into the issue.\u003c/p\u003e\n"]]],["The Google Wallet API returns specific error codes: 400 (BadRequestException) indicates an invalid argument, requiring checks on data structure. 403 (PermissionDeniedException) means the service account lacks authorization. 404 (NotFoundException) signals a missing Wallet Object or Class, needing a GET request before PATCH/PUT actions. 409 (AlreadyExistsException) indicates an existing class, suggesting a GET request and potential PATCH/PUT instead of creating it again. Web errors are displayed to developers and admins.\n"],null,["# Error codes and exceptions\n\nAPI error responses\n-------------------\n\nThe following table explains error codes that mayn be returned by the Google Wallet API, their possible causes, and solutions.\n\n| Exception | Example Message | Suggestion |\n|------------------------------------|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 400 - BadRequestException | Request contains an invalid argument. Invalid resource ID: {1234567891234567899 - ABCD1234567}. | Check the data structure for type, format and length and pass the correct argument. |\n| 403 - PermissionDeniedException | Permission Denied | Ensure the correct [Service Account](https://developers.google.com/wallet/retail/loyalty-cards/web/prerequisites#4.-authorize-the-service-account) email is an authorized user within your Business Pay and Wallet Console. |\n| 404 - NotFoundException | Wallet Object {1234567891234567899.SampleClubCardxf6a8edf-87ca-4022-a813-694cc57e9fd3} not found. | Perform a [GET](https://developers.google.com/wallet/generic/rest/v1/genericclass/get#http-request) on the Object ID before trying before a [PATCH](https://developers.google.com/wallet/generic/rest/v1/genericclass/patch#http-request) or [PUT](https://developers.google.com/wallet/generic/rest/v1/genericclass/update#http-request) request to ensure you have an object to update and that it's the latest. |\n| 404 - IssuerClassNotFoundException | Wallet Object Class {1234567891234567899.ABCD.1234567} not found. | When performing an update , ensure you do a [GET](https://developers.google.com/wallet/generic/rest/v1/genericclass/get#http-request) request before a [PATCH](https://developers.google.com/wallet/generic/rest/v1/genericclass/patch#http-request) or [PUT](https://developers.google.com/wallet/generic/rest/v1/genericclass/update#http-request) request to ensure you have a class to reference that it's the latest class. Also ensure the correct payload (object and class) is being used in the request correctly. |\n| 409 - AlreadyExistsException | Wallet Object Class {1234567891234567899.ABCD.1234567} already exists. | Perform a [GET](https://developers.google.com/wallet/generic/rest/v1/genericclass/get#http-request) on the Class ID before trying to create the same Class ID. If the resource exists you may want to use [PATCH](https://developers.google.com/wallet/generic/rest/v1/genericclass/patch#http-request) or [PUT.](https://developers.google.com/wallet/generic/rest/v1/genericclass/update#http-request) |\n\nWeb-based error messages\n------------------------\n\nIf something goes wrong when you attempt to save a pass using an 'Add to Google Wallet' link, you will be shown an informative error message to help you debug. These messages are only shown to users that have the 'Developer' or 'Admin' role for the associated Issuer account.\n\nHere is an example of the type of error message that might be displayed:"]]