Skip to content

fix: validate cookie/url before setCookie to prevent tough-cookie [ob…#519

Open
MrNanko wants to merge 1 commit intochavyleung:masterfrom
MrNanko:fix/cookie-validate
Open

fix: validate cookie/url before setCookie to prevent tough-cookie [ob…#519
MrNanko wants to merge 1 commit intochavyleung:masterfrom
MrNanko:fix/cookie-validate

Conversation

@MrNanko
Copy link

@MrNanko MrNanko commented Mar 8, 2026

问题

运行时出现 Cookie 写入失败,导致请求流程中断。

原始报错

undefined
[object Object]
Error: [object Object]
    at Object.validate (/app/run/node_modules/tough-cookie/lib/validators.js:91:13)
    at CookieJar.setCookie (/app/run/node_modules/tough-cookie/lib/cookie.js:1119:16)
    at CookieJar.setCookie (/app/run/node_modules/universalify/index.js:5:67)
    at CookieJar.setCookieSync (/app/run/node_modules/tough-cookie/lib/cookie.js:1728:17)
    at EventEmitter.<anonymous> (/app/run/sfsyV3.js:389:6914)
    at EventEmitter.emit (node:events:507:28)
    at fns.<computed> (/app/run/node_modules/got/dist/source/core/utils/proxy-events.js:7:16)
    at Request.emit (node:events:507:28)
    at Request._onResponseBase (/app/run/node_modules/got/dist/source/core/index.js:903:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant