DIYgod/RSSHub · error · Error

[${query.status}]信息有误,请重新检查后订阅:${query.message}

Error message

[${query.status}]信息有误,请重新检查后订阅:${query.message}

What it means

Thrown by kuaidi100's getQuery when the query API returns a `status` field that is not '200' (e.g. '408' = validation code error). Unlike the 查无结果 case, this is an explicit business error: the response carries a `message` (e.g. '快递公司参数异常:验证码错误') which is embedded into the thrown Error. The result is cached before throwing to avoid hammering the API with the same bad combo.

Source

Thrown at lib/routes/kuaidi100/utils.ts:265

            });

            query = queryResponse.data;
            if (query.status === '200') {
                if (query.data && query.data[0].context === '查无结果') {
                    // 查无结果 appears when cookie is invaild, force update cookie.
                    clearCookie();
                    throw new Error('暂时无法获取快递信息,请稍后重试...');
                }
                if (query.ischeck === '0') {
                    // Not yet complete, don't cache for now.
                    // To avoid frquent link test when add source, add 180s cache
                    cache.set(query_key, query ?? '', 180);
                } else {
                    cache.set(query_key, query ?? ''); // Finished, cache id
                }
            } else {
                cache.set(query_key, query ?? ''); // Error, cache as well
                throw new Error(`[${query.status}]信息有误,请重新检查后订阅:${query.message}`);
            }
        }

        return query;
    },
};

View on GitHub (pinned to bed535e087)

Solutions

  1. Verify the company `number` matches the carrier that actually issued the tracking id
  2. Confirm the tracking id passes company.checkReg (see checkCode) before subscribing
  3. If status is '408' with 验证码错误, slow down — you are hitting anti-automation; reduce query frequency
  4. Cache is populated on error, so wait for the cache window to expire or bust kuaidi100-query-<number>-<id> before retrying

Example fix

// before
throw new Error(`[${query.status}]信息有误,请重新检查后订阅:${query.message}`);
// after — classify captcha vs input error
const msg = `[${query.status}] ${query.message}`;
if (query.status === '408') {
    throw new Error(`${msg} (likely anti-automation captcha — reduce frequency)`);
}
throw new Error(`信息有误,请重新检查后订阅:${msg}`);
Defensive patterns

Strategy: try-catch

Validate before calling

// Inspect the envelope before subscribing
async function probeQuery(number: string, id: string, phone?: string): Promise<{ ok: boolean; status?: string; message?: string }> {
  try {
    const q = await utils.getQuery(number, id, phone);
    return { ok: q.status === '200', status: q.status, message: q.message };
  } catch (e) {
    return { ok: false, message: (e as Error).message };
  }
}

Type guard

interface KuaidiQuery { status: string; message?: string; ischeck?: string; data?: { context?: string; time?: string }[] }
function isQuerySuccess(q: KuaidiQuery): boolean { return q.status === '200'; }

Try / catch

try { await utils.getQuery(number, id, phone); }
catch (e) {
  const msg = (e as Error).message;
  if (/\[408\]|验证码/.test(msg)) {
    // anti-automation — back off significantly, do not retry immediately
    await new Promise((r) => setTimeout(r, 60_000));
  } else if (/信息有误/.test(msg)) {
    throw new InvalidParameterError(msg); // user-fixable input
  }
  throw e;
}

Prevention

When it happens

Trigger: GET /query returns status '408' (or any non-200 code) with a message describing the failure. Most often: wrong company-number pairing, malformed tracking id, or 快递100's anti-automation captcha requirement ('验证码错误').

Common situations: Mismatched company code and tracking number (e.g. zhongtong number passed as yuantong); tracking id with invalid format failing company.checkReg; captcha/verification-code challenge triggered by automation; upstream API envelope change.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/e77ad88ec3fbfb70. Report an issue: GitHub.