fix: Improve error handling and logging across multiple modules; enhance compatibility for legacy formats

This commit is contained in:
2025-11-14 20:56:48 +01:00
parent ec1596bbbd
commit cbd05d128e
12 changed files with 83 additions and 41 deletions

View File

@@ -36,7 +36,7 @@ export class Retry {
const util = new Util()
const parse = (v: number | string) => {
if (typeof v === 'number') return v
try { return util.stringToMs(String(v)) } catch { return def.baseDelay }
try { return util.stringToMs(String(v)) } catch { /* Invalid time string: fall back to default */ return def.baseDelay }
}
this.policy = {
maxAttempts: (merged.maxAttempts as number) ?? def.maxAttempts,