{"record":{"id":"4b103b0c63b27f36","repo":"DIYgod/RSSHub","slug":"wechat-mp-params-join-consider-raise-an","errorCode":null,"errorMessage":"wechat-mp: ${params.join(': ')}\nConsider raise an issue (mentioning @Rongronggg9) with the article URL for further investigation","messagePattern":"wechat-mp: (.+?)\nConsider raise an issue \\(mentioning @Rongronggg9\\) with the article URL for further investigation","errorType":"exception","errorClass":"WeChatMpError","httpStatus":null,"severity":"error","filePath":"lib/utils/wechat-mp.ts","lineNumber":53,"sourceCode":"import { parseDate } from '@/utils/parse-date';\n\nclass WeChatMpError extends Error {\n    constructor(message: string) {\n        super(message);\n        this.name = 'WeChatMpError';\n    }\n}\n\nconst MAINTAINERS = ['@Rongronggg9'];\n\nconst formatLogNoMention = (...params: string[]): string => `wechat-mp: ${params.join(': ')}`;\nconst formatLog = (...params: string[]): string => `${formatLogNoMention(...params)}\nConsider raise an issue (mentioning ${MAINTAINERS.join(', ')}) with the article URL for further investigation`;\nlet warn = (...params: string[]) => logger.warn(formatLog(...params));\nconst error = (...params: string[]): never => {\n    const msg = formatLog(...params);\n    logger.error(msg);\n    throw new WeChatMpError(msg);\n};\nconst errorNoMention = (...params: string[]): never => {\n    const msg = formatLogNoMention(...params);\n    logger.error(msg);\n    throw new WeChatMpError(msg);\n};\nconst toggleWerror = (() => {\n    const onFunc = (...params: string[]) => error('WarningAsError', ...params);\n    const offFunc = warn;\n    return (on: boolean) => {\n        warn = on ? onFunc : offFunc;\n    };\n})();\n\nconst replaceReturnNewline = (() => {\n    const returnRegExp = /\\r|\\\\(r|x0d)/g;\n    const newlineRegExp = /\\n|\\\\(n|x0a)/g;\n    return (text: string, replaceReturnWith = '', replaceNewlineWith = '<br>') => text.replaceAll(returnRegExp, () => replaceReturnWith).replaceAll(newlineRegExp, () => replaceNewlineWith);","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/utils/wechat-mp.ts#L35-L71","documentation":"wechat-mp.ts builds a two-line error message via formatLog (the route prefix plus a request to file an issue mentioning @Rongronggg9) and throws it as a WeChatMpError. It is raised by the error() helper, which is also wired into WarningAsError: when toggleWerror(true) is active, ordinary warnings are promoted to this fatal error.","triggerScenarios":"The WeChat MP article extractor encounters a recoverable condition (e.g. content extraction warning) while WarningAsError is on, or any code path calls error(...) directly with a fatal failure such as an unrecognised page structure.","commonSituations":"Running wechat-mp routes with WECHAT_MP_WARNING_AS_ERROR (or equivalent config) enabled; Tencent changing the mp.weixin.qq.com HTML so a previously-warning branch now hard-fails; network/proxy issues surfacing as errors during article fetch.","solutions":["Disable WarningAsError for the wechat-mp route so warnings log instead of throwing.","Inspect the article URL in the error message and report it to the maintainer if the page structure has genuinely changed.","Verify the WeChat MP fetch path (proxy, UA, cookies) is healthy so the underlying warning condition disappears."],"exampleFix":"// before\n// WarningAsError on -> warning promoted to WeChatMpError\n// after\ntoggleWerror(false); // warnings log instead of throw","handlingStrategy":"try-catch","validationCode":"function shouldHardFail(): boolean {\n  // reflect your WECHAT_MP_WARNING_AS_ERROR config\n  return String(process.env?.WECHAT_MP_WARNING_AS_ERROR ?? '').toLowerCase() !== 'true';\n}\nif (!shouldHardFail()) { /* warnings stay warnings */ }","typeGuard":"const isWeChatMpError = (e: unknown): boolean =>\n  e instanceof Error && /^wechat-mp:/.test(e.message);","tryCatchPattern":"try {\n  return await parseWeChatMp(url);\n} catch (e) {\n  if (e instanceof WeChatMpError && /Consider raise an issue/.test(e.message)) {\n    logger.warn(e.message); // demote to warning, keep serving\n    return fallbackItem;\n  }\n  throw e;\n}","preventionTips":["Keep WarningAsError off in production unless you actively monitor wechat-mp feeds.","Log WeChatMpError separately and alert on the 'issue' suffix to distinguish upstream changes from user errors.","Pin a known-good proxy/UA configuration for mp.weixin.qq.com to reduce extraction warnings."],"tags":["wechat-mp","parsing","rss-route","config"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}