oak-domain 5.1.11 → 5.1.12

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.
@@ -35,7 +35,16 @@ export type ServerConfiguration = {
35
35
  };
36
36
  internalExceptionMask?: string;
37
37
  koaBody?: {
38
- maxFileSize?: number;
38
+ multipart?: boolean;
39
+ formidable?: {
40
+ maxFileSize?: number;
41
+ maxFields?: number;
42
+ maxFieldsSize?: number;
43
+ uploadDir?: string;
44
+ keepExtensions?: boolean;
45
+ hashAlgorithm?: string;
46
+ multiples?: boolean;
47
+ };
39
48
  };
40
49
  };
41
50
  /**
@@ -118,6 +118,9 @@ class SimpleConnector {
118
118
  }
119
119
  catch (err) {
120
120
  // fetch返回异常一定是网络异常
121
+ if (err instanceof types_1.OakRequestTimeoutException) {
122
+ throw new types_1.OakNetworkException(`接口请求超时`);
123
+ }
121
124
  throw new types_1.OakNetworkException(`接口请求时发生网络异常`);
122
125
  }
123
126
  return this.parseAspectResult(response);
@@ -140,7 +143,10 @@ class SimpleConnector {
140
143
  response = await this.fetchWithTimeout(this.serverSubscribePointUrl, {}, this.timeout);
141
144
  }
142
145
  catch (err) {
143
- throw new types_1.OakNetworkException();
146
+ if (err instanceof types_1.OakRequestTimeoutException) {
147
+ throw new types_1.OakNetworkException(`接口请求超时`);
148
+ }
149
+ throw new types_1.OakNetworkException(`接口请求时发生网络异常`);
144
150
  }
145
151
  if (response.status > 299) {
146
152
  const err = new types_1.OakServerProxyException(`网络请求返回status是${response.status}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oak-domain",
3
- "version": "5.1.11",
3
+ "version": "5.1.12",
4
4
  "author": {
5
5
  "name": "XuChang"
6
6
  },