|
|
@@ -300,9 +300,15 @@ async function openRoomRedEnvelop(redEnvelopId, isPassCode = 0) {
|
|
|
magicJS.logger.error(e);
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
- const msg = `请求抢红包发生异常\n${JSON.stringify(err)}`;
|
|
|
- magicJS.logger.error(msg);
|
|
|
- return err.response.body;
|
|
|
+ if (err.response && err.response.body) {
|
|
|
+ if (err.response.statusCode == 417) {
|
|
|
+ // 417: 红包已领完
|
|
|
+ }
|
|
|
+ return err.response.body;
|
|
|
+ } else {
|
|
|
+ const msg = `请求抢红包发生异常\n${JSON.stringify(err)}`;
|
|
|
+ magicJS.logger.error(msg);
|
|
|
+ }
|
|
|
});
|
|
|
if (!result) {
|
|
|
return;
|