錯誤碼
更新時間 2024-11-24 16:36:07
最近更新時間: 2024-11-24 16:36:07
分享文章
本章主要介紹API網關的錯誤碼。
當調用API時,可能遇到下表所示的錯誤碼。
說明
??通過APIG接口管理API,發生錯誤時,產生的錯誤碼請按照錯誤碼信息進行修改。
??使用APIG錯誤碼時,請以錯誤碼(如APIG.0101)為準,錯誤信息并非固定不變,有時會對錯誤信息進行優化修改。
表 錯誤碼
錯誤碼 錯誤信息 HTTP狀態碼 語義 解決方案 APIG.0101 The API does not exist or has not been published in the environment. 404 API不存在或未發布到環境 檢查調用API所使用的域名、請求方法、路徑和注冊的API是否一致;檢查API是否發布,如果發布到非生產環境,檢查請求X-Stage頭是否為發布的環境名;檢查調用API使用的域名是否已經綁定到API所在的分組。 APIG.0101 The API does not exist. 404 API請求方法不存在 檢查API請求方法是否與API定義的方法相同 APIG.0103 The backend does not exist. 500 無法找到后端 聯系技術支持 APIG.0104 The plug-ins do not exist. 500 無法找到插件配置 聯系技術支持 APIG.0105 The backend configurations do not exist. 500 無法找到后端配置 聯系技術支持 APIG.0106 Orchestration error. 400 編排錯誤 檢查API配置的前后端參數是否合理 APIG.0201 API request error. 400 請求格式不合法 使用合法的請求 APIG.0201 Request entity too large. 413 請求body過大(大于12M) 減小請求body大小 APIG.0201 Request URI too large. 414 請求URI過大(大于32K) 減小請求URI大小 APIG.0201 Request headers too large. 494 請求頭過大(單個請求頭大于32K或所有請求頭總長度大于128K) 減小請求頭大小 APIG.0201 Backend unavailable. 502 后端不可用 檢查API配置的后端地址是否可用 APIG.0201 Backend timeout. 504 后端超時 增大超時時間或縮小后端的處理時間 APIG.0201 An unexpected error occurred 500 內部錯誤 聯系技術支持 APIG.0204 SSL protocol is not supported: TLSv1.1 400 SSL協議版本不支持 使用支持的SSL協議版本 APIG.0301 Incorrect IAM authentication information. 401 IAM認證信息錯誤 檢查token是否正確 APIG.0302 The IAM user is not authorized to access the API. 403 IAM用戶不允許訪問API 檢查用戶是否被黑白名單限制 APIG.0303 Incorrect app authentication information. 401 APP認證信息錯誤 檢查請求的方法、路徑、查詢參數、請求體和簽名使用的方法、路徑、查詢參數、請求體是否一致;檢查客戶端機器時間是否正確。 APIG.0304 The app is not authorized to access the API. 403 APP不允許訪問API 檢查APP是否授權訪問API APIG.0305 Incorrect authentication information. 401 認證信息錯誤 檢查認證信息是否正確 APIG.0306 API access denied. 403 不允許訪問API 檢查是否授權訪問API APIG.0307 The token must be updated. 401 token需要更新 重新從IAM獲取token APIG.0308 The throttling threshold has been reached. 429 超出流控值限制 等待流控刷新后訪問。如果觸發子域名的單日請求數上限,請綁定獨立域名。 APIG.0310 The project is unavailable. 403 project不可使用 使用其他project訪問 APIG.0311 Incorrect debugging authentication information. 401 調試認證信息錯誤 聯系技術支持 APIG.0401 Unknown client IP address. 403 無法識別客戶端IP地址 聯系技術支持 APIG.0402 The IP address is not authorized to access the API. 403 IP地址不允許訪問 檢查IP地址是否被黑白名單限制 APIG.0404 Access to the backend IP address has been denied. 403 后端IP不允許訪問 后端IP地址或后端域名對應的IP地址不允許訪問 APIG.0502 The app has been frozen. 405 APP被凍結 余額不足 APIG.0601 Internal server error. 500 內部錯誤 聯系技術支持 APIG.0602 Bad request. 400 非法請求 檢查請求是否合法 APIG.0605 Domain name resolution failed. 500 域名解析失敗 檢查域名拼寫,以及域名是否綁定了正確的后端地址 APIG.0606 Failed to load the API configurations. 500 未加載API配置 聯系技術支持 APIG.0607 The following protocol is supported: {xxx} 400 協議不被允許,允許的協議是xxx。
注意:xxx以實際響應中的內容為準。改用支持的協議(HTTP/HTTPS)訪問 APIG.0608 Failed to obtain the admin token. 500 無法獲取管理帳戶 聯系技術支持 APIG.0609 The VPC backend does not exist. 500 找不到vpc后端 聯系技術支持 APIG.0610 No backend available. 502 沒有可連接的后端 檢查所有后端是否可用,如調用信息與實際配置是否一致。 APIG.0611 The backend port does not exist. 500 后端端口未找到 聯系技術支持 APIG.0612 An API cannot call itself. 500 API調用自身 修改API后端配置,遞歸調用層數不能超過10層。 APIG.0613 The IAM service is currently unavailable. 503 IAM服務暫時不可用 聯系技術支持 APIG.0705 Backend signature calculation failed. 500 計算后端簽名失敗 聯系技術支持 APIG.0802 The IAM user is forbidden in the currently selected region 403 該IAM用戶在當前region中被禁用 聯系技術支持 APIG.1009 AppKey or AppSecret is invalid 400 AppKey或AppSecret不合法 檢查請求的AppKey或AppSecret是否正確