错误码规范
Last updated
2023-07-13 17:11:52
{"value":"\u672c\u8282\u4e3a\u60a8\u63d0\u4f9b\u8bf7\u6c42\u51fa\u73b0\u9519\u8bef\u65f6\uff0c\u8fd4\u56de\u7684\u9519\u8bef\u7801\u548c\u5bf9\u5e94\u7684\u9519\u8bef\u4fe1\u606f\u3002\n\n\n\n\n\n## **\u9519\u8bef\u54cd\u5e94\u683c\u5f0f**\n\n\u5f53\u60a8\u8bf7\u6c42\u51fa\u73b0\u9519\u8bef\u65f6\uff0c\u54cd\u5e94\u5934\u90e8\u4fe1\u606f\u5305\u62ec\uff1a\n\n- Content-Type: application\/json\n- \u4e00\u4e2a\u5408\u9002\u7684 3xx\uff0c4xx\uff0c\u6216\u8005 5xx \u7684 HTTP \u72b6\u6001\u7801\n\n\u5404\u4e2a\u63a5\u53e3\u5728\u9047\u5230\u6267\u884c\u9519\u8bef\u65f6\uff0c\u5c06\u8fd4\u56de\u4e00\u4e2a JSON \u683c\u5f0f\u7ec4\u7ec7\u7684\u4fe1\u606f\u5bf9\u8c61\uff0c\u63cf\u8ff0\u51fa\u9519\u539f\u56e0\u3002\u5177\u4f53\u683c\u5f0f\u5982\u4e0b\uff1a\n\n```\n{\n \"code\": <httpCode int>, \n \"error\": \"<errMsg string>\"\n}\n```\n\n| \u5b57\u6bb5\u540d\u79f0 | \u8bf4\u660e |\n| -------- | -------------------------------- |\n| code | \u8fd4\u56de\u7684\u9519\u8bef\u7801\uff0c\u7528\u6765\u5b9a\u4f4d\u9519\u8bef\u573a\u666f\u3002 |\n| error | \u5305\u542b\u8be6\u7ec6\u7684\u9519\u8bef\u4fe1\u606f |\n\n\n\n\n\n### **\u9519\u8bef\u7801\u5217\u8868**\n\n\u4ee5\u4e0b\u8868\u683c\u5217\u51fa\u4e86\u6240\u6709\u9519\u8bef\u7801\uff1a\n\n| HTTP\u72b6\u6001\u7801 | \u8bf4\u660e |\n| ---------- | ------------------------------------------------------------ |\n| 298 | \u90e8\u5206\u64cd\u4f5c\u6267\u884c\u6210\u529f |\n| 400 | \u8bf7\u6c42\u62a5\u6587\u683c\u5f0f\u9519\u8bef \u5305\u62ec\u4e0a\u4f20\u65f6\uff0c\u4e0a\u4f20\u8868\u5355\u683c\u5f0f\u9519\u8bef\u3002\u4f8b\u5982`incorrect region`\u8868\u793a\u4e0a\u4f20\u57df\u540d\u4e0e\u4e0a\u4f20\u7a7a\u95f4\u7684\u533a\u57df\u4e0d\u7b26\uff0c\u6b64\u65f6\u9700\u8981\u5347\u7ea7 SDK \u7248\u672c\u3002 |\n| 401 | \u8ba4\u8bc1\u6388\u6743\u5931\u8d25 \u9519\u8bef\u4fe1\u606f\u5305\u62ec\u5bc6\u94a5\u4fe1\u606f\u4e0d\u6b63\u786e\uff1b\u6570\u5b57\u7b7e\u540d\u9519\u8bef\uff1b\u6388\u6743\u5df2\u8d85\u65f6\uff0c\u4f8b\u5982`token not specified`\u8868\u793a\u4e0a\u4f20\u8bf7\u6c42\u4e2d\u6ca1\u6709\u5e26 token \uff0c\u53ef\u4ee5\u6293\u5305\u9a8c\u8bc1\u540e\u6392\u67e5\u4ee3\u7801\u903b\u8f91; `token out of date`\u8868\u793a token \u8fc7\u671f\uff0c\u63a8\u8350 token \u8fc7\u671f\u65f6\u95f4\u8bbe\u7f6e\u4e3a 3600 \u79d2\uff081 \u5c0f\u65f6\uff09\uff0c\u5982\u679c\u662f\u5ba2\u6237\u7aef\u4e0a\u4f20\uff0c\u5efa\u8bae\u6bcf\u6b21\u4e0a\u4f20\u4ece\u670d\u52a1\u7aef\u83b7\u53d6\u65b0\u7684 token\uff1b`bad token`\u8868\u793a token \u9519\u8bef\uff0c\u8bf4\u660e\u751f\u6210 token \u7684\u7b97\u6cd5\u6709\u95ee\u9898\uff0c\u5efa\u8bae\u76f4\u63a5\u4f7f\u7528\u4e03\u725b\u670d\u52a1\u7aef SDK \u751f\u6210 token\u3002 |\n| 403 | \u6743\u9650\u4e0d\u8db3\uff0c\u62d2\u7edd\u8bbf\u95ee\u3002 \u4f8b\u5982`key doesn't match scope`\u8868\u793a\u4e0a\u4f20\u6587\u4ef6\u6307\u5b9a\u7684 key \u548c\u4e0a\u4f20 token \u4e2d\uff0cputPolicy \u7684 scope \u5b57\u6bb5\u4e0d\u7b26\u3002\u4e0a\u4f20\u6307\u5b9a\u7684 key \u5fc5\u987b\u8ddf scope \u91cc\u7684 key \u5b8c\u5168\u5339\u914d\u6216\u8005\u524d\u7f00\u5339\u914d\uff1b`ExpUser can only upload image\/audio\/video\/plaintext`\u8868\u793a\u8d26\u53f7\u662f\u4f53\u9a8c\u7528\u6237\uff0c\u4f53\u9a8c\u7528\u6237\u53ea\u80fd\u4e0a\u4f20\u6587\u672c\u3001\u56fe\u7247\u3001\u97f3\u9891\u3001\u89c6\u9891\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u5b8c\u6210\u5b9e\u540d\u8ba4\u8bc1\u5373\u53ef\u89e3\u51b3\uff1b`not allowed`\u8868\u793a\u60a8\u662f\u4f53\u9a8c\u7528\u6237\uff0c\u82e5\u60f3\u7ee7\u7eed\u64cd\u4f5c\uff0c\u8bf7\u5148\u524d\u5f80\u5b9e\u540d\u8ba4\u8bc1\u3002 |\n| 404 | \u8d44\u6e90\u4e0d\u5b58\u5728 \u5305\u62ec\u7a7a\u95f4\u8d44\u6e90\u4e0d\u5b58\u5728\uff1b\u955c\u50cf\u6e90\u8d44\u6e90\u4e0d\u5b58\u5728\u3002 |\n| 405 | \u8bf7\u6c42\u65b9\u5f0f\u9519\u8bef \u4e3b\u8981\u6307\u975e\u9884\u671f\u7684\u8bf7\u6c42\u65b9\u5f0f\u3002 |\n| 406 | \u4e0a\u4f20\u7684\u6570\u636e CRC32 \u6821\u9a8c\u9519\u8bef |\n| 413 | \u8bf7\u6c42\u8d44\u6e90\u5927\u5c0f\u5927\u4e8e\u6307\u5b9a\u7684\u6700\u5927\u503c |\n| 419 | \u7528\u6237\u8d26\u53f7\u88ab\u51bb\u7ed3 |\n| 478 | \u955c\u50cf\u56de\u6e90\u5931\u8d25 \u4e3b\u8981\u6307\u955c\u50cf\u6e90\u670d\u52a1\u5668\u51fa\u73b0\u5f02\u5e38\u3002 |\n| 502 | \u9519\u8bef\u7f51\u5173 |\n| 503 | \u670d\u52a1\u7aef\u4e0d\u53ef\u7528 |\n| 504 | \u670d\u52a1\u7aef\u64cd\u4f5c\u8d85\u65f6 |\n| 573 | \u5355\u4e2a\u8d44\u6e90\u8bbf\u95ee\u9891\u7387\u8fc7\u9ad8 |\n| 579 | \u4e0a\u4f20\u6210\u529f\u4f46\u662f\u56de\u8c03\u5931\u8d25 \u5305\u62ec\u4e1a\u52a1\u670d\u52a1\u5668\u5f02\u5e38\uff1b\u4e03\u725b\u670d\u52a1\u5668\u5f02\u5e38\uff1b\u670d\u52a1\u5668\u95f4\u7f51\u7edc\u5f02\u5e38\u3002\u9700\u8981\u786e\u8ba4\u56de\u8c03\u670d\u52a1\u5668\u63a5\u53d7 POST \u8bf7\u6c42\uff0c\u5e76\u53ef\u4ee5\u7ed9\u51fa 200 \u7684\u54cd\u5e94\u3002 |\n| 599 | \u670d\u52a1\u7aef\u64cd\u4f5c\u5931\u8d25 |\n| 608 | \u8d44\u6e90\u5185\u5bb9\u88ab\u4fee\u6539 |\n| 612 | \u6307\u5b9a\u8d44\u6e90\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664 |\n| 614 | \u76ee\u6807\u8d44\u6e90\u5df2\u5b58\u5728 |\n| 630 | \u5df2\u521b\u5efa\u7684\u7a7a\u95f4\u6570\u91cf\u8fbe\u5230\u4e0a\u9650\uff0c\u65e0\u6cd5\u521b\u5efa\u65b0\u7a7a\u95f4\u3002 |\n| 631 | \u6307\u5b9a\u7a7a\u95f4\u4e0d\u5b58\u5728 |\n| 640 | \u8c03\u7528\u5217\u4e3e\u8d44\u6e90(list)\u63a5\u53e3\u65f6\uff0c\u6307\u5b9a\u975e\u6cd5\u7684`marker`\u53c2\u6570\u3002 |\n| 701 | \u5728\u65ad\u70b9\u7eed\u4e0a\u4f20\u8fc7\u7a0b\u4e2d\uff0c\u540e\u7eed\u4e0a\u4f20\u63a5\u6536\u5730\u5740\u4e0d\u6b63\u786e\u6216`ctx`\u4fe1\u606f\u5df2\u8fc7\u671f\u3002 |"}