# Debug Mode Rules (Non-Obvious Only)

## API Response Codes
- [`interceptor.ts`](src/api/interceptor.ts) expects `code: 20000` for success. Other codes trigger error messages.
- Token expiry codes: 50008, 50012, 50014 trigger logout modal.

## Token Storage
- Tokens stored via [`SafeStorage`](src/utils/safeStorage.ts) with key `AppStorageKey.TOKEN`.
- Token expiry redirects to `/auth/login` (not `/login`).

## Route Loading Issues
- If routes not loading, check `isMenuLoading`/`isMenuLoaded` flags in [`permission.ts`](src/router/guard/permission.ts).
- Server menu fetched via [`fetchServerMenuConfig()`](src/store/modules/app/index.ts).

## Environment
- Dev config: `.env.development`, Prod config: `.env.production`
- API base URL: `VITE_API_BASE_URL`, Workspace: `VITE_APP_WORKSPACE`