fixed up workers
This commit is contained in:
parent
60d7de1da8
commit
f41622e530
5 changed files with 30 additions and 8 deletions
19
libs/core/cache/src/redis-cache.ts
vendored
19
libs/core/cache/src/redis-cache.ts
vendored
|
|
@ -305,9 +305,22 @@ export class RedisCache implements CacheProvider {
|
|||
return null;
|
||||
}
|
||||
this.updateStats(true);
|
||||
const parsed = JSON.parse(value);
|
||||
this.logger.debug('Cache raw get hit', { key });
|
||||
return parsed;
|
||||
|
||||
try {
|
||||
const parsed = JSON.parse(value);
|
||||
this.logger.debug('Cache raw get hit', { key });
|
||||
return parsed;
|
||||
} catch (error) {
|
||||
// If JSON parsing fails, log the error with more context
|
||||
this.logger.warn('Cache getRaw JSON parse failed', {
|
||||
key,
|
||||
valueLength: value.length,
|
||||
valuePreview: value.substring(0, 100),
|
||||
error: error instanceof Error ? error.message : String(error)
|
||||
});
|
||||
// Return the raw value as-is if it can't be parsed
|
||||
return value as unknown as T;
|
||||
}
|
||||
},
|
||||
null,
|
||||
'getRaw'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue