@jetthai/cuora 1.1.472-dev.0 → 1.1.472-dev.1
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/machine/activity/activity_cash.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.472-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.472-dev.0...v1.1.472-dev.1) (2026-10-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
|
|
11
|
+
|
|
12
|
+
### [1.1.472](https://github.com/jetthai/cuora-module/compare/v1.1.471...v1.1.472) (2026-09-24)
|
|
13
|
+
|
|
14
|
+
### [1.1.471](https://github.com/jetthai/cuora-module/compare/v1.1.470...v1.1.471) (2026-09-23)
|
|
15
|
+
|
|
5
16
|
### [1.1.472-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.471-dev.1...v1.1.472-dev.0) (2026-09-29)
|
|
6
17
|
|
|
7
18
|
### [1.1.471-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.471-dev.0...v1.1.471-dev.1) (2026-09-24)
|
package/package.json
CHANGED
|
@@ -184,6 +184,12 @@ export default function (request) {
|
|
|
184
184
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
185
185
|
])
|
|
186
186
|
|
|
187
|
+
// send() 不保證回傳 { data } 信封(200 但 body 非 JSON 時回字串,data 即為 undefined)。非陣列必須在 service 內 reject 走 onError,
|
|
188
|
+
// 不可進入 setActivityList:assign 內拋錯會讓 interpreter 清空事件佇列,machine 永久停在 fetchingList、輪詢中止
|
|
189
|
+
if (!Array.isArray(data)) {
|
|
190
|
+
throw new Error('[activity_cash] fetchList: activityList is not an array')
|
|
191
|
+
}
|
|
192
|
+
|
|
187
193
|
return {
|
|
188
194
|
activityList: data,
|
|
189
195
|
promotionList,
|
|
@@ -212,6 +218,12 @@ export default function (request) {
|
|
|
212
218
|
isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : Promise.resolve(null),
|
|
213
219
|
])
|
|
214
220
|
|
|
221
|
+
// ERR_800/維護中時 send() 回 undefined,進到 setActivityDetailList 讀 item.data 會在 assign 內拋錯而卡死 machine;
|
|
222
|
+
// 整輪 reject 走 onError,保留上一輪明細並於下個 TIMEOUT 重試
|
|
223
|
+
if (!activityDetailList.every((res) => res !== null && typeof res === 'object')) {
|
|
224
|
+
throw new Error('[activity_cash] fetchActivityDetailList: invalid detail response')
|
|
225
|
+
}
|
|
226
|
+
|
|
215
227
|
return {
|
|
216
228
|
activityDetailList,
|
|
217
229
|
progressSummary: progressSummaryRes?.data || null,
|