# Function: joinGranted()

```ts
function joinGranted(
   node, 
   grant, 
   onError?
): Promise<void>;
```

Defined in: [packages/core/src/session/connect.ts:687](https://github.com/leifriksheim/minca/blob/main/core/src/session/connect.ts#L687)

Joins the spaces a grant names that the node doesn't hold yet: again,
harmlessly, on later starts. A space that won't join throws, unless
`onError` takes it and the rest are joined.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `node` | [`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md) |
| `grant` | [`Grant`](https://minca.dev/api/session/interfaces/Grant.md) |
| `onError?` | (`error`) => `void` |

## Returns

`Promise`\<`void`\>
