# Errors

> This error occurs when you're using handleCtx, which is a method responsible for handling and checking if the session instantiation is correct. Possible causes of this error are:
>
> - **Canonical URL:** https://www.builderbot.app/en/errors
> - **Documentation Index:** https://www.builderbot.app/llms.txt
> - **Full Corpus:** https://www.builderbot.app/llms-full.txt

Common errors you may encounter while developing your applications

## Code 100 

```ts
{
  error: `You must first log in by scanning the qr code to be able to use this functionality.`,
  docs: `https://builderbot.vercel.app/errors`,
  code: `100`,
}
```

This error occurs when you're using `handleCtx`, which is a method responsible for handling and checking if the session instantiation is correct. Possible causes of this error are:

- Make sure you have an active session
- Make sure you have scanned the QR code to start the session

If the error persists after ensuring you have an active session, then the problem is being generated by the logic you're creating. Try wrapping the part of the logic that's causing the error in a try-catch block and see if you can identify the error.

```ts
  provider.server.post('/v1/register', handleCtx(async (bot, req, res) => {
    try {
      const { number, name } = req.body
      await bot.dispatch('EVENT_REGISTER', { from: number, name })
      return res.end('trigger')
    } catch (error) {
      console.log(error)
      return res.end(error)
    }
  }))
```

---
