本文件說明 Google API 傳回的部分錯誤代碼和訊息。具體而言,本文列出的錯誤是來自 Google API 的通用或預設網域。許多 API 也會定義本身的網域,並說明不屬於通用網域的特定 API 錯誤。如果是這類錯誤,JSON 回應的 domain 屬性值會是 API 的專屬值,如 youtube.parameter。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Error messages\n\nThis document identifies some of the error codes and messages that Google APIs return. Specifically, the errors listed here are in the global, or default, domain for Google APIs. Many APIs also define their own domains, which identify API-specific errors that are not in the global domain. For those errors, the value of the `domain` property in the JSON response will be an API-specific value, such as `youtube.parameter`.\n\nThis page lists errors by their HTTP status codes as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-6).\n\nThe sample JSON response below demonstrates how a global error is communicated: \n\n```transact-sql\n{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"global\",\n \"reason\": \"invalidParameter\",\n \"message\": \"Invalid string value: 'asdf'. Allowed values: [mostpopular]\",\n \"locationType\": \"parameter\",\n \"location\": \"chart\"\n }\n ],\n \"code\": 400,\n \"message\": \"Invalid string value: 'asdf'. Allowed values: [mostpopular]\"\n }\n}\n```\n\nErrors\n------\n\n1. [MOVED_PERMANENTLY (301)](#MOVED_PERMANENTLY)\n2. [SEE_OTHER (303)](#SEE_OTHER)\n3. [NOT_MODIFIED (304)](#NOT_MODIFIED)\n4. [TEMPORARY_REDIRECT (307)](#TEMPORARY_REDIRECT)\n5. [BAD_REQUEST (400)](#BAD_REQUEST)\n6. [UNAUTHORIZED (401)](#UNAUTHORIZED)\n7. [PAYMENT_REQUIRED (402)](#PAYMENT_REQUIRED)\n8. [FORBIDDEN (403)](#FORBIDDEN)\n9. [NOT_FOUND (404)](#NOT_FOUND)\n10. [METHOD_NOT_ALLOWED (405)](#METHOD_NOT_ALLOWED)\n11. [CONFLICT (409)](#CONFLICT)\n12. [GONE (410)](#GONE)\n13. [PRECONDITION_FAILED (412)](#PRECONDITION_FAILED)\n14. [REQUEST_ENTITY_TOO_LARGE (413)](#REQUEST_ENTITY_TOO_LARGE)\n15. [REQUESTED_RANGE_NOT_SATISFIABLE (416)](#REQUESTED_RANGE_NOT_SATISFIABLE)\n16. [EXPECTATION_FAILED (417)](#EXPECTATION_FAILED)\n17. [PRECONDITION_REQUIRED (428)](#PRECONDITION_REQUIRED)\n18. [TOO_MANY_REQUESTS (429)](#TOO_MANY_REQUESTS)\n19. [INTERNAL_SERVER_ERROR (500)](#INTERNAL_SERVER_ERROR)\n20. [NOT_IMPLEMENTED (501)](#NOT_IMPLEMENTED)\n21. [SERVICE_UNAVAILABLE (503)](#SERVICE_UNAVAILABLE)\n\n### MOVED_PERMANENTLY (301)\n\n### SEE_OTHER (303)\n\n### NOT_MODIFIED (304)\n\n### TEMPORARY_REDIRECT (307)\n\n### BAD_REQUEST (400)\n\n### UNAUTHORIZED (401)\n\n### PAYMENT_REQUIRED (402)\n\n### FORBIDDEN (403)\n\n### NOT_FOUND (404)\n\n### METHOD_NOT_ALLOWED (405)\n\n### CONFLICT (409)\n\n### GONE (410)\n\n### PRECONDITION_FAILED (412)\n\n### REQUEST_ENTITY_TOO_LARGE (413)\n\n### REQUESTED_RANGE_NOT_SATISFIABLE (416)\n\n### EXPECTATION_FAILED (417)\n\n### PRECONDITION_REQUIRED (428)\n\n### TOO_MANY_REQUESTS (429)\n\n### INTERNAL_SERVER_ERROR (500)\n\n### NOT_IMPLEMENTED (501)\n\n### SERVICE_UNAVAILABLE (503)"]]