오류 코드 및 예외
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
API 오류 응답
다음 표에는 Google Wallet API에서 반환할 수 있는 오류 코드와 가능한 원인, 해결 방법이 설명되어 있습니다.
예외 |
예시 메시지 |
추천 |
400 - BadRequestException |
요청에 잘못된 인수가 포함되어 있습니다. 잘못된 리소스 ID: {1234567891234567899 - ABCD1234567} |
데이터 구조의 유형, 형식, 길이를 확인하고 올바른 인수를 전달합니다. |
403 - PermissionDeniedException |
승인 거부됨 |
올바른 서비스 계정 이메일이 Business Pay 및 월렛 콘솔 내의 승인된 사용자인지 확인합니다. |
404 - NotFoundException - |
월렛 객체 {1234567891234567899.SampleClubCardxf6a8edf-87ca-4022-a813-694cc57e9fd3}를 찾을 수 없습니다. |
PATCH 또는 PUT 요청 전에 시도하기 전에 객체 ID에 GET을 수행하여 업데이트할 객체가 있는지, 최신 객체인지 확인합니다. |
404 - IssuerClassNotFoundException |
월렛 객체 클래스 {1234567891234567899.ABCD.1234567}을(를) 찾을 수 없습니다. |
업데이트를 실행할 때 PATCH 또는 PUT 요청 전에 GET 요청을 실행하여 최신 클래스임을 참조할 클래스가 있는지 확인합니다. 또한 올바른 페이로드 (객체 및 클래스)가 요청에서 올바르게 사용되고 있는지 확인합니다. |
409 - AlreadyExistsException |
월렛 객체 클래스 {1234567891234567899.ABCD.1234567}이(가) 이미 존재합니다. |
동일한 클래스 ID를 만들기 전에 클래스 ID에 GET을 실행합니다. 리소스가 있으면 PATCH 또는 PUT.을 사용할 수 있습니다. |
웹 기반 오류 메시지
'Google 월렛에 추가' 링크를 사용하여 패스를 저장하려고 할 때 문제가 발생하면 디버그하는 데 도움이 되는 정보 제공 오류 메시지가 표시됩니다. 이러한 메시지는 연결된 발급기관 계정에 '개발자' 또는 '관리자' 역할이 있는 사용자에게만 표시됩니다.
다음은 표시될 수 있는 오류 메시지 유형의 예입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eThis page explains the various error codes returned by the Google Wallet API, including BadRequestException, PermissionDeniedException, NotFoundException, IssuerClassNotFoundException, and AlreadyExistsException.\u003c/p\u003e\n"],["\u003cp\u003eEach error code is accompanied by a description, potential causes, and suggestions for resolution, such as data validation, permission checks, and resource verification.\u003c/p\u003e\n"],["\u003cp\u003eBefore update requests (PATCH or PUT), it's crucial to perform a GET request to ensure the resource exists and you have the latest version to prevent conflicts.\u003c/p\u003e\n"],["\u003cp\u003eFor 'Add to Google Wallet' links, web-based error messages are displayed to developers and admins to aid in debugging issues during pass saving.\u003c/p\u003e\n"],["\u003cp\u003eThese messages provide insights into the problem, helping developers understand and resolve issues effectively.\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:"]]