pot-app/pot-desktop · error · Error

Can not find default_drive_id: ${JSON.stringify(result)}

Error message

Can not find default_drive_id: ${JSON.stringify(result)}

What it means

driveId() called the alipan getDriveInfo API with a Bearer token; the response was HTTP-ok but its JSON body contained no default_drive_id field, meaning the API accepted the request yet returned a payload without the drive identifier (e.g. an error body delivered with 200, an expired/quota-limited token response, or an API contract change). It fires whenever the response shape does not match the expected { default_drive_id } object.

Source

Thrown at src/window/Config/pages/Backup/utils/aliyun.jsx:200

        } else {
            throw new Error(`Get accessToken Error: ${JSON.stringify(result)}`);
        }
    }
}

async function driveId(token) {
    const res = await fetch('https://openapi.alipan.com/adrive/v1.0/user/getDriveInfo', {
        method: 'POST',
        headers: {
            Authorization: `Bearer ${token}`,
        },
    });
    if (res.ok) {
        const result = res.data;
        if (result['default_drive_id']) {
            return result['default_drive_id'];
        } else {
            throw new Error(`Can not find default_drive_id: ${JSON.stringify(result)}`);
        }
    } else {
        const result = res.data;
        if (result['message']) {
            throw new Error(result['message']);
        } else {
            throw new Error(`Get accessToken Error: ${JSON.stringify(result)}`);
        }
    }
}

async function createDir(token, drive_id) {
    const res = await fetch('https://openapi.alipan.com/adrive/v1.0/openFile/create', {
        method: 'POST',
        headers: {
            Authorization: `Bearer ${token}`,
        },
        body: Body.json({

View on GitHub (pinned to 594d32ede9)

Solutions

  1. Inspect the JSON.stringify(result) in the message to see the actual API response (likely a code/message error payload) and address the reported cause
  2. Re-authenticate to obtain a fresh valid access token before retrying
  3. Check that the alipan API response parsing is correct (e.g. res.data is actually the parsed JSON body)
  4. Wrap the call site (drive_id) so the user is prompted to re-login or reconfigure the Aliyun backup integration
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/window/Config/pages/Backup/utils/aliyun.jsx:200 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pot-app/pot-desktop@594d32ede9 (2026-09-02). Data as JSON: /api/errors/6e6510b88c2c98d3. Report an issue: GitHub.