chore(net-tool): 升级版本 & 优化错误处理
All checks were successful
Egg Server MIflow / build-image (push) Successful in 45s
All checks were successful
Egg Server MIflow / build-image (push) Successful in 45s
This commit is contained in:
parent
d283540b00
commit
2e65e73c13
@ -37,7 +37,7 @@
|
||||
"@egg/hooks": "^1.2.0",
|
||||
"@egg/lark-msg-tool": "^1.2.0",
|
||||
"@egg/logger": "^1.3.0",
|
||||
"@egg/net-tool": "^1.4.0",
|
||||
"@egg/net-tool": "^1.5.1",
|
||||
"@egg/path-tool": "^1.3.0",
|
||||
"node-schedule": "^2.1.1",
|
||||
"p-limit": "^6.1.0",
|
||||
|
@ -16,8 +16,9 @@ class LarkBaseService extends NetToolBase {
|
||||
protected async request<T = any>(params: any): Promise<T> {
|
||||
return super.request<T>(params).catch((error: NetError) => {
|
||||
const res = {
|
||||
httpStatus: error.response?.status,
|
||||
code: error.code,
|
||||
data: null,
|
||||
data: error.data,
|
||||
message: error.message,
|
||||
} as T
|
||||
this.logger.error("larkNetTool catch error: ", JSON.stringify(res))
|
||||
|
Loading…
x
Reference in New Issue
Block a user