{"id":"6094c77d1aa3b77d","repo":"sindresorhus/got","slug":"the-maximum-acceptable-retry-noise-is-100ms-g","errorCode":null,"errorMessage":"The maximum acceptable retry noise is +/- 100ms, got ${value.noise}","messagePattern":"The maximum acceptable retry noise is \\+/- 100ms, got (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"source/core/options.ts","lineNumber":3073,"sourceCode":"\t*/\n\tget retry(): Partial<RetryOptions> {\n\t\treturn this.#internals.retry;\n\t}\n\n\tset retry(value: Partial<RetryOptions>) {\n\t\tassertPlainObject('retry', value);\n\n\t\tassertAny('retry.calculateDelay', [is.function, is.undefined], value.calculateDelay);\n\t\tassertAny('retry.maxRetryAfter', [is.number, is.undefined], value.maxRetryAfter);\n\t\tassertAny('retry.limit', [is.number, is.undefined], value.limit);\n\t\tassertAny('retry.methods', [is.array, is.undefined], value.methods);\n\t\tassertAny('retry.statusCodes', [is.array, is.undefined], value.statusCodes);\n\t\tassertAny('retry.errorCodes', [is.array, is.undefined], value.errorCodes);\n\t\tassertAny('retry.noise', [is.number, is.undefined], value.noise);\n\t\tassertAny('retry.enforceRetryRules', [is.boolean, is.undefined], value.enforceRetryRules);\n\n\t\tif (value.noise && Math.abs(value.noise) > 100) {\n\t\t\tthrow new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`);\n\t\t}\n\n\t\tfor (const key of Object.keys(value)) {\n\t\t\tif (key === '__proto__') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!(key in this.#internals.retry)) {\n\t\t\t\tthrow new Error(`Unexpected retry option: ${key}`);\n\t\t\t}\n\t\t}\n\n\t\tif (this.#merging) {\n\t\t\tsafeObjectAssign(this.#internals.retry, value);\n\t\t} else {\n\t\t\tthis.#internals.retry = {...value};\n\t\t}\n","sourceCodeStart":3055,"sourceCodeEnd":3091,"githubUrl":"https://github.com/sindresorhus/got/blob/e3924aa1e53a6ca3eb93a43618ce532442a89b40/source/core/options.ts#L3055-L3091","documentation":"Thrown by the `retry` setter when `retry.noise` has an absolute value greater than 100 (milliseconds). The noise value jitters the exponential backoff to avoid thundering-herd retries; Got caps it at +/-100ms because larger jitter would make retry timing unpredictable and could exceed timeout budgets.","triggerScenarios":"Calling `got(url, {retry: {noise: 500}})` or any negative value like `{retry: {noise: -250}}` where `Math.abs(noise) > 100`.","commonSituations":"Copying a noise/`jitter` value from another library that allows larger ranges; tuning retry timing without reading the cap; passing milliseconds vs seconds by mistake.","solutions":["Set `retry.noise` to a value between -100 and 100 (inclusive).","Leave `noise` unset to use Got's default jitter.","If you need wider spread, raise `retry.limit`/`retry.maxRetryAfter` instead of inflating noise."],"exampleFix":"// before\nawait got(url, {retry: {limit: 3, noise: 500}});\n// after\nawait got(url, {retry: {limit: 3, noise: 100}});","handlingStrategy":"validation","validationCode":"function clampNoise(noise) {\n  if (noise !== undefined && Math.abs(noise) > 100) {\n    throw new Error(`retry.noise must be within +/-100ms; got ${noise}`);\n  }\n}","typeGuard":"function isValidNoise(v: unknown): boolean {\n  return v === undefined || (typeof v === 'number' && Math.abs(v) <= 100);\n}","tryCatchPattern":null,"preventionTips":["Keep `retry.noise` within +/-100ms or omit it.","Do not copy jitter values from libraries with larger ranges."],"tags":["options","retry","validation","config","network"],"analyzedSha":"e3924aa1e53a6ca3eb93a43618ce532442a89b40","analyzedAt":"2026-08-03T19:22:24.770Z","schemaVersion":2}