**Subject:** `retool check` typecheck fails: local `useBackendFunction` stub is missing `dataAccessErrors`
**Summary**
In a code-based app, `retool check` fails the typecheck phase (and so blocks `retool push`). The cause is the local stand-in hook that the CLI writes. The generated `use` hooks are documented to return `dataAccessErrors`, but the stub's return type does not include it, so any code that reads `dataAccessErrors` fails to type-check. The build phase passes.
**Environment**
- Retool CLI 0.4.106 (launcher 0.1.10). `retool update` reports this is up to date with our instance.
- Instance:
- App UUID:
- Node v22.23.2 , pnpm 10.34.6, macOS (Apple Silicon)
**Steps to reproduce**
1. In a code-based app, use a generated hook and read `dataAccessErrors`:
```tsx
const usersQuery = useGetUsers()
usersQuery.dataAccessErrors.map((e) => e.message)
```
2. Run `retool check`.
**Expected**
Typecheck passes. The header of each generated file in `frontend/hooks/backend/*.ts` says:
> Each hook returns `{ data, loading, error, dataAccessErrors, trigger }`
**Actual**
```
✓ hooks: passed
✓ validate: passed
✗ typecheck: TypeScript reported type errors.
✓ build: passed
✗ check: one or more required phases failed
frontend/pages/Users.tsx(108,17): error TS2339: Property 'dataAccessErrors' does not exist on type '{ data: any; loading: boolean; error: string | null; trigger: (params?: Record<string, unknown> | undefined, options?: { skipCache?: boolean; } | undefined) => any; }'.
frontend/pages/Users.tsx(109,64): error TS7006: Parameter 'e' implicitly has an 'any' type.
```
In our app this produces about 40 errors across 17 files, all with the same cause.
**Cause**
`frontend/hooks/useBackendFunction.ts`, generated by `retool init` / `check` / `start`, declares:
```ts
): {
data: any
loading: boolean
error: string | null
trigger: (params?: Record<string, unknown>, options?: { skipCache?: boolean }) => any
}
```
`dataAccessErrors` is missing. The runtime does return it: `frontend/hooks/consumeExecuteStream.ts` parses `dataAccessErrors` from the response.
**Suggested fix**
Add `dataAccessErrors: { message: string }[]` to the stub's return type and return `dataAccessErrors: []` from the stub.
**Impact**
`retool push` runs `retool check` first, so we can't push from a local checkout. Editing the stub doesn't help, because the CLI regenerates it on every run.