mm_ret 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/error.js +51 -51
- package/lib/ret.js +3 -1
- package/package.json +1 -1
- package/test.js +3 -0
package/lib/error.js
CHANGED
|
@@ -23,31 +23,31 @@ class Error {
|
|
|
23
23
|
"zh-CN": {
|
|
24
24
|
"10000": "业务逻辑错误",
|
|
25
25
|
"0": "成功",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
26
|
+
"100": "继续",
|
|
27
|
+
"101": "切换协议",
|
|
28
|
+
"200": "确定",
|
|
29
|
+
"201": "已创建",
|
|
30
|
+
"202": "已接受",
|
|
31
|
+
"204": "无内容",
|
|
32
|
+
"301": "已永久移动",
|
|
33
|
+
"302": "已找到",
|
|
34
|
+
"303": "见其他",
|
|
35
|
+
"304": "未修改",
|
|
36
|
+
"307": "临时重定向",
|
|
37
|
+
"400": "错误请求",
|
|
38
|
+
"401": "未授权",
|
|
39
|
+
"403": "禁止访问",
|
|
40
|
+
"404": "未找到",
|
|
41
|
+
"405": "方法不允许",
|
|
42
|
+
"408": "请求超时",
|
|
43
|
+
"413": "Payload Too Large",
|
|
44
|
+
"415": "不支持的媒体类型",
|
|
45
|
+
"429": "请求过多",
|
|
46
|
+
"500": "内部服务器错误",
|
|
47
|
+
"501": "未实现",
|
|
48
|
+
"502": "错误网关",
|
|
49
|
+
"503": "服务不可用",
|
|
50
|
+
"504": "网关超时",
|
|
51
51
|
"-32700": "格式错误",
|
|
52
52
|
"-32701": "不支持的编码",
|
|
53
53
|
"-32702": "编码中包含无效字符",
|
|
@@ -66,31 +66,31 @@ class Error {
|
|
|
66
66
|
"en-US": {
|
|
67
67
|
"10000": "business logic error",
|
|
68
68
|
"0": "success",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
69
|
+
"100": "Continue",
|
|
70
|
+
"101": "Switching Protocols",
|
|
71
|
+
"200": "OK",
|
|
72
|
+
"201": "Created",
|
|
73
|
+
"202": "Accepted",
|
|
74
|
+
"204": "No Content",
|
|
75
|
+
"301": "Moved Permanently",
|
|
76
|
+
"302": "Found",
|
|
77
|
+
"303": "See Other",
|
|
78
|
+
"304": "Not Modified",
|
|
79
|
+
"307": "Temporary Redirect",
|
|
80
|
+
"400": "Bad Request",
|
|
81
|
+
"401": "Unauthorized",
|
|
82
|
+
"403": "Forbidden",
|
|
83
|
+
"404": "Not Found",
|
|
84
|
+
"405": "Method Not Allowed",
|
|
85
|
+
"408": "Request Timeout",
|
|
86
|
+
"413": "Payload Too Large",
|
|
87
|
+
"415": "Unsupported Media Type",
|
|
88
|
+
"429": "Too Many Requests",
|
|
89
|
+
"500": "Internal Server Error",
|
|
90
|
+
"501": "Not Implemented",
|
|
91
|
+
"502": "Bad Gateway",
|
|
92
|
+
"503": "Service Unavailable",
|
|
93
|
+
"504": "Gateway Timeout",
|
|
94
94
|
"-32700": "not well formed",
|
|
95
95
|
"-32701": "unsupported encoding",
|
|
96
96
|
"-32702": "invalid character for encoding",
|
|
@@ -126,7 +126,7 @@ Error.prototype.setConfig = function (config) {
|
|
|
126
126
|
Error.prototype.get = function (code) {
|
|
127
127
|
const lang = this._config.lang;
|
|
128
128
|
const lang_pack = this._langs[lang];
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
if (lang_pack && lang_pack[code]) {
|
|
131
131
|
return lang_pack[code];
|
|
132
132
|
}
|
package/lib/ret.js
CHANGED
package/package.json
CHANGED
package/test.js
CHANGED