DIYgod/RSSHub · warning · Error
[本地]信息有误,请检查后重试:${message}
Error message
[本地]信息有误,请检查后重试:${message} What it means
Thrown by the kuaidi100 (快递100) handler as a plain Error when utils.checkCode returns status=false — i.e. the company shorthand was not found in the company list, OR (for shunfeng) the last-4-phone was missing/invalid. The message embeds checkCode's `message` field, so the actual reason (unsupported company vs missing phone) is preserved.
Source
Thrown at lib/routes/kuaidi100/index.ts:57
// First, check if code is vaild
const { status, message, company } = await utils.checkCode(number, id, phone);
let data;
const time = new Date().toString();
if (status) {
const query: any = await utils.getQuery(number, id, phone);
data =
query.status === '200'
? query.data
: [
{
context: query.message,
time,
},
];
} else {
throw new Error(`[本地]信息有误,请检查后重试:${message}`);
}
// Maybe we can look into isCheck, condition, and state :)
// But I just want to make it work for now.
return {
title: `快递 ${company.name}-${id}`,
link: 'https://www.kuaidi100.com',
description: `快递 ${company.name}-${id}`,
item: data.map((item) => ({
title: item.context,
description: item.context,
guid: new Date(item.time || item.ftime).toUTCString(),
pubDate: new Date(item.time || item.ftime).toUTCString(),
link: 'https://www.kuaidi100.com',
})),
};
}
View on GitHub (pinned to bed535e087)
Solutions
- Use a valid company `number` — look it up via utils.company() or the 快递100 company list
- For SF Express (shunfeng), append the 4-digit phone suffix as the third path segment
- Double-check spelling: e.g. shunfeng, zhongtong, yuantong, etc.
- If the company genuinely exists but is missing from the cached list, bust the kuaidi100-company-name-<date> cache key
Example fix
// before
throw new Error(`[本地]信息有误,请检查后重试:${message}`);
// after — distinguish the two sub-cases for the caller
if (message.includes('手机号')) {
throw new InvalidParameterError(message); // user-fixable input
} else {
throw new InvalidParameterError(`Unsupported company code '${number}'. ${message}`);
} Defensive patterns
Strategy: validation
Validate before calling
import utils from './utils';
async function preflightKuaidi100(number: string, id: string, phone?: string) {
const { status, message } = await utils.checkCode(number, id, phone);
if (!status) throw new Error(`[preflight] ${message}`);
}
// call before utils.getQuery
await preflightKuaidi100(number, id, phone); Type guard
interface CheckCodeOk { status: true; regex?: boolean; company: { name: string } }
interface CheckCodeFail { status: false; message: string; company: { name: string } }
function checkCodeOk(r: CheckCodeOk | CheckCodeFail): r is CheckCodeOk { return r.status; } Try / catch
try { await utils.getQuery(number, id, phone); }
catch (e) {
if (e instanceof Error && e.message.startsWith('[本地]')) {
// user-fixable input — surface as 400, do not retry
throw new InvalidParameterError(e.message);
}
throw e;
} Prevention
- Always run checkCode before getQuery — it catches unsupported companies and missing SF phone
- For shunfeng, require the 4-digit phone suffix at the route-validation layer
- Cache the company list daily so checkCode stays fast
- Document the company-code shorthand lookup for users
When it happens
Trigger: Request to /kuaidi100/track/<number>/<id>[/phone] where <number> is not a recognized company code in the kuaidi100 company.do list (status=false, message='快递公司编号不受支持!'), or where number contains 'shunfeng' but phone is absent/not 4 digits (message='顺丰查询需要手机号后四位!').
Common situations: Typo in company code (e.g. 'shunfengg'); using a company not registered with 快递100; forgetting the phone segment for SF Express; passing phone as a non-numeric string.
Related errors
- Invalid id
- 分类不存在
- Invalid category: ${category}
- Bad timeRange range. See <a href="https://docs.rsshub.app/ro
- Bad parameter. See <a href="https://docs.rsshub.app/routes/g
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/f2600e3e8d94b3e2.
Report an issue: GitHub.