# Troubleshooting

## Check the installed version

```bash
npm ls @qentrah/sdk
```

Compare the installed version with the version noted in this guide. Inspect your lockfile before changing dependencies; prerelease behavior may differ between versions.

## Import or module errors

Use only public import paths listed in [API and exports](/docs/npm-sdk/reference). Avoid importing guessed paths inside `dist`. ESM-only packages require an ESM-aware application. Install declared peer dependencies in the consuming application.

## Error handling

```ts
import { QentrahError } from '@qentrah/sdk'

try {
  await qentrah.content.create({ collectionId: 'articles', title: 'Hello' })
} catch (error) {
  if (error instanceof QentrahError) {
    console.error(error.status, error.code, error.message)
  }
}
```

## 401 or 403 responses

Verify the client’s token or API key and the server permissions for the requested collection. Do not place administrative API keys in a browser bundle. Public browser access should use the authentication contract provided by your CMS deployment.

## Unexpected list shape or timestamps

Use the documented resource’s response shape. Do not treat a documents keyset cursor like a content offset, or document timestamps as milliseconds.