etherreq 1.0.37 → 1.0.38
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/package.json +1 -1
- package/src/etherreq.js +2 -3
package/package.json
CHANGED
package/src/etherreq.js
CHANGED
|
@@ -39,11 +39,10 @@ const dispatchRequest = async (config) => {
|
|
|
39
39
|
if (!res.ok) {
|
|
40
40
|
throw new Error(`HTTP 错误: ${res.status} - ${res.statusText}`);
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
console.log(text);
|
|
43
43
|
// 判断是否是 HTML 内容
|
|
44
44
|
if (text.trim().startsWith('<')) {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
|
|
47
46
|
throw new Error('服务器返回了 HTML 页面,预期为 JSON 格式');
|
|
48
47
|
}
|
|
49
48
|
|