Update to fall back but still use cache

This commit is contained in:
Owen
2026-08-31 17:02:03 -04:00
parent 34671c6b13
commit 2cc7d03ace
+7 -2
View File
@@ -272,8 +272,13 @@ LQIDAQAB
logger.error( logger.error(
`Allowing failure. Will retry one more time at next run interval.` `Allowing failure. Will retry one more time at next run interval.`
); );
// return last known good status // Fall back to last known good status if we have
return status; // one cached; otherwise return the freshly built
// status (with defaults) rather than undefined.
const lastKnownStatus = this.statusCache.get(
this.statusKey
) as LicenseStatus | undefined;
return lastKnownStatus ?? status;
} else { } else {
// Subsequent failures: fail abruptly // Subsequent failures: fail abruptly
throw e; throw e;