# Troubleshooting (/docs/memory/troubleshooting)
Find what you're seeing in the first column, then follow the fix.

## Capturing [#capturing]

| What you see | Why it happens | What to do |
| --- | --- | --- |
| `API key is required` | `DOCKLEE_API_KEY` isn't set where your code runs. | Set the variable, or pass `api_key` (Python) or `apiKey` (TypeScript). |
| `Dock instance is closed` | `capture` was called after `close()`. | Create a new `Dock`, or close it only when you're done. |
| Memories never arrive | The process exited before the buffer was sent. | Call `flush_sync()` or `close()` before exit. See [Batching and flush](/docs/memory/essentials/batching-and-flush). |
| `422` with `missing_destination` | The request named neither a memory space nor a container. | Set `DOCKLEE_MEMORY_SPACE_ID`, or pass `memory_space_id`. |
| `400` with `invalid_memory_space_id` | The memory space ID isn't a valid ID. | Copy the ID again from **DUM**. |
| `duplicate_event` in `errors` | The same content arrived within 60 seconds. | Expected for retries. To record a repeat, use a different `dedup_key`. |
| `memory_space_not_authorized` in `errors` | The key can't write to this memory space. | Use a key with `write` or `both`, scoped to the space. |
| `403` | The key's capability, runtimes, or scope don't allow the write. | Check the key in **API Keys**. See [API keys](/docs/docklee/api-keys). |
| `429` | You've hit your plan's write rate limit. | Retry after the time in `Retry-After`. The SDK retries for you. |

## Recalling [#recalling]

| What you see | Why it happens | What to do |
| --- | --- | --- |
| `memory_space_id is required for recall()` | No space ID was given. | Set `DOCKLEE_MEMORY_SPACE_ID`, or pass `memory_space_id`. |
| Recall returns `[]` in a space with memories | The space is multi-user, and no `end_user` was passed. | Pass the same `end_user` you captured with. See [End users](/docs/docklee/end-users). |
| An old value comes back | The update was edited into the old memory, or never captured. | Capture the change as a new memory. See [Contradictions and updates](/docs/memory/intelligence/contradictions-and-updates). |
| Both conflicting facts come back | Docklee couldn't tell which is right. | Settle it in the **Review** tab. See [Review and correction](/docs/memory/governance/review-and-correction). |
| A memory disappeared | It expired under the space's retention. | Extend it, or change the space's retention. See [Retention](/docs/memory/governance/retention). |
| `429` | You've hit your plan's read rate limit. | Retry after the time in `Retry-After`. The SDK retries for you. |

## Still stuck [#still-stuck]

<Callout type="info">
See the [FAQs](/docs/docklee/faqs), or contact Docklee support with the `batch_id` from the capture response and the time of the request.
</Callout>

## Next steps [#next-steps]

Back to building. These pages cover the calls you'll use most.

<Cards>
  <Card title="Capture memory" href="/docs/memory/capture-memory" description="Every capture option." />
  <Card title="Recall memory" href="/docs/memory/recall-memory" description="Every recall option." />
  <Card title="How memory works" href="/docs/memory/how-memory-works" description="What happens between the two." />
</Cards>
