Skip to content

Commit d43f35b

Browse files
add comment
1 parent ee498f0 commit d43f35b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/backend/src/connectionManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ export class ConnectionManager {
166166
}
167167
});
168168

169+
// Fail safe: if the job is not PENDING (first run) or IN_PROGRESS (retry), it indicates the job
170+
// is in an invalid state and should be skipped.
169171
if (currentStatus.status !== ConnectionSyncJobStatus.PENDING && currentStatus.status !== ConnectionSyncJobStatus.IN_PROGRESS) {
170172
throw new Error(`Job ${jobId} is not in a valid state. Expected: ${ConnectionSyncJobStatus.PENDING} or ${ConnectionSyncJobStatus.IN_PROGRESS}. Actual: ${currentStatus.status}. Skipping.`);
171173
}

0 commit comments

Comments
 (0)