|
|
@@ -632,10 +632,10 @@ async function hbRequest(config, data) {
|
|
|
}).catch(err => {
|
|
|
const msg = `请求发送异常\n${JSON.stringify(err)}`;
|
|
|
magicJS.logger.error(msg);
|
|
|
- if(response.body){
|
|
|
+ if(err.response && err.response.body){
|
|
|
if (baseConfig.encrypt) {
|
|
|
if (typeof body === "string") {
|
|
|
- let rspText = decryptAES(body.trim(), baseConfig.k, baseConfig.v);
|
|
|
+ let rspText = decryptAES(err.response.body.trim(), baseConfig.k, baseConfig.v);
|
|
|
err.message = `${err.message}\n${rspText}`;
|
|
|
}
|
|
|
}
|