rename the error message CANNOT_FIND_EXCEPT_JOB to CANNOT_FIND_EXCEPT_JOB_IN_THIS_JOB_EXPECTATION

This commit is contained in:
geekgeekrun
2024-10-02 23:24:30 +08:00
parent f133695c37
commit b6a1ba4eab

View File

@@ -303,7 +303,7 @@ async function toRecommendPage (hooks) {
if (tempTargetJobIndexToCheckDetail < 0 && hasReachLastPage) {
// has reach last page and not find target job
reject(new Error('CANNOT_FIND_EXCEPT_JOB'))
reject(new Error('CANNOT_FIND_EXCEPT_JOB_IN_THIS_JOB_EXPECTATION'))
return
}
@@ -376,7 +376,7 @@ async function toRecommendPage (hooks) {
if (targetJobIndex < 0 && hasReachLastPage) {
// has reach last page and not find target job
reject(new Error('CANNOT_FIND_EXCEPT_JOB'))
reject(new Error('CANNOT_FIND_EXCEPT_JOB_IN_THIS_JOB_EXPECTATION'))
return
}
}
@@ -434,7 +434,7 @@ async function toRecommendPage (hooks) {
} catch (err) {
if (err instanceof Error) {
switch (err.message) {
case 'CANNOT_FIND_EXCEPT_JOB': {
case 'CANNOT_FIND_EXCEPT_JOB_IN_THIS_JOB_EXPECTATION': {
if (
currentExceptJobIndex + 1 > expectJobList.length
) {