[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis guide provides best practice tips for troubleshooting errors encountered when working with the Display & Video 360 API, covering common causes like bugs, invalid input, or API issues.\u003c/p\u003e\n"],["\u003cp\u003eWhen an error occurs, the API typically returns a JSON response with an \u003ccode\u003eerror\u003c/code\u003e object containing details about the issue; if not, review basic setup steps.\u003c/p\u003e\n"],["\u003cp\u003eIf the error isn't readily understood, consult the common errors section, reference documentation, or the Display & Video 360 help center for field validation and limits.\u003c/p\u003e\n"],["\u003cp\u003eTo identify the root cause, examine your code, validate input values using HTTP request logs, and use debugging tools to pinpoint the source of the problem.\u003c/p\u003e\n"],["\u003cp\u003eIf you're unable to resolve the error, contact the support team with detailed information about the issue, troubleshooting steps taken, and relevant code snippets.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting\n\nThere are many scenarios where you may encounter errors when working with the\nDisplay \\& Video 360 API. These could relate to a bug in your code, invalid user input,\nor even an issue with the API itself. Whatever the reason, knowing how to\ntroubleshoot errors is an important part of the development process. This guide\nwill provide some best practice tips to get you started.\n\nReviewing the basics\n--------------------\n\n1. Review the [prequisites guide](/display-video/api/guides/getting-started/overview#prerequisites). Ensure you have access to Display \\& Video 360 and a properly configured API project.\n2. If your response contains HTTP errors, make sure you review these carefully and ensure that the request is being made to the correct API and service.\n3. Review the [authorization guide](/display-video/api/guides/how-tos/authorizing). Ensure your request contains the necessary OAuth 2.0 credentials.\n4. Verify that you're using the correct credentials. See the\n [Set Up Your Application guide](/display-video/api/guides/getting-started/configure) for details on generating\n authentication credentials. You may also pass your access token to the\n [Google OAuth2 API's tokeninfo endpoint](//developers.google.com/apis-explorer/#p/oauth2/v2/oauth2.tokeninfo) to verify that it is\n issued to the correct API project and authorized for the correct scope(s):\n\n POST https://www.googleapis.com/oauth2/v2/tokeninfo?access_token={YOUR_ACCESS_TOKEN}\n\n 200 OK\n\n {\n \"issued_to\": \"{API_PROJECT_CLIENT_ID}\",\n \"audience\": \"...\",\n \"scope\": \"{API_SCOPES}\",\n \"expires_in\": ...\n }\n\nUnderstanding errors\n--------------------\n\nWhen the API encounters an error, it normally returns a JSON response containing\nan `error` object. This object provides additional context about the specific\nerror that was encountered. \n\n {\n \"error\": {\n \"code\": 404,\n \"message\": \"Resource type LINE_ITEM does not exist: advertisers/1/lineItems/1\",\n \"status\": \"NOT_FOUND\"\n }\n }\n\n| **Note:** If you receive an error response that does not include an `error` object, there's a chance the error is not coming from the Display \\& Video 360 API. Please refer back to the section on [reviewing the basics](#basics) before continuing.\n\nUsually the contents of the `error` object will contain enough information to\nhelp you identify what's gone wrong. If not, you may need to do some additional\nresearch to figure out what the error means.\n\n### Researching errors\n\n1. Refer to the section on [common errors](/display-video/api/guides/best-practices/errors), which provides\n details for some of the most frequently encountered errors.\n\n2. If the error isn't covered in the common errors section, refer to the\n [reference documentation](/display-video/api/reference/rest) and try searching for the error code,\n status, and message.\n\n3. If you come across any errors that aren't documented, please let us know.\n\n| **Key Point:** If the error you've encountered relates to field validation or a partner/advertiser limit, review the [Display \\& Video 360 help center](//support.google.com/displayvideo) for more information. These rules and limits are inherited from Display \\& Video 360 and are not enforced by the Display \\& Video 360 API itself.\n\nIdentifying the root cause\n--------------------------\n\nBy this point you've identified the error and understand what it means. If not,\nhead back to [understanding errors](#understand) or jump ahead to\n[getting help](#get-help) if you believe you've come across an error in the API\nthat you can't fix yourself.\n\nBefore you can fix the error, you'll need to identify what's causing it. Often\nthis will be a bug in your code or an invalid input value.\n\nTo determine whether the issue is related to a bug in your code, you\nshould first verify that your code is working as intended. As a first step,\nconsider reviewing the section of code responsible for making the failing\nrequest to check for obvious issues. In some cases it may be necessary to use a\ndebugging tool to step through the code line-by-line to ensure it's functioning\ncorrectly.\n\nExamining HTTP requests is another useful way to identify potential bugs, as\nwell as cases of invalid input. Many of the official client libraries can be\nconfigured to log HTTP requests and responses; review the documentation for your\nlibrary of choice for more details. An HTTP proxy such as\n[Charles](//www.charlesproxy.com/), [Squid](//www.squid-cache.org/), or [Fiddler](//www.telerik.com/fiddler)\ncan also be used to capture request and response logs. Once you obtain these\nlogs, review them to ensure that the request parameter values being provided by\nyour application are correct and match what you expect.\n\nOnce you identify the bug or invalid input responsible for causing the error,\nthe fix will hopefully be obvious. If you're stuck or unsure how best to fix the\nproblem, however, you can use the information you've gathered so far when\ngetting help.\n\n### Getting help\n\nIf you aren't able to resolve an error yourself, you can contact our support\nteam via this [form](/display-video/api/support/contact) located in the Display \\& Video 360 help center.\n\nWhen filling out this form, you should include as much information as possible\nabout the issue you're facing and the troubleshooting steps you've already\ntaken. Useful information to include:\n\n- HTTP request and response logs. Make sure to redact sensitive information such as OAuth 2.0 access tokens, email addresses, etc.\n- Code snippet. If you're able to isolate the issue to a particular section of code or suspect the issue is language-specific, include a small snippet to illustrate what you're doing.\n- Additional information, such as runtime/interpreter version and platform, which may be useful for others attempting to reproduce the issue.\n\nFixing the issue\n----------------\n\nOnce you've identified the cause of the issue and come up with a solution, it's\ntime to implement a fix. Whenever possible, test your fix in a controlled\nenvironment (such as a partner or advertiser configured specifically for\ntesting) against a range of both good and bad inputs before deploying to\nproduction."]]