Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docusaurus/docs/cms/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ The `ForbiddenError` class is a specific error class used when a user either doe
throw new errors.ForbiddenError('Ah ah ah, you didn\'t say the magic word');
```

:::note
The custom `message` passed to `ForbiddenError` is not included in the API response. Instead, the API returns the default message. If you need to return a custom error message indicating insufficient permissions, use [`PolicyError`](#policies) instead.
:::

</TabItem>

<TabItem value="Unauthorized" label="Unauthorized">
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/static/llms-code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22366,6 +22366,10 @@ File path: N/A

```

:::note
The custom `message` passed to `ForbiddenError` is not included in the API response. Instead, the API returns the default message. If you need to return a custom error message indicating insufficient permissions, use [`PolicyError`](#policies) instead.
:::

</TabItem>

<TabItem value="Unauthorized" label="Unauthorized">
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/static/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29697,6 +29697,10 @@ The `ForbiddenError` class is a specific error class used when a user either doe
throw new errors.ForbiddenError('Ah ah ah, you didn\'t say the magic word');
```

:::note
The custom `message` passed to `ForbiddenError` is not included in the API response. Instead, the API returns the default message. If you need to return a custom error message indicating insufficient permissions, use [`PolicyError`](#policies) instead.
:::

The `UnauthorizedError` class is a specific error class used when a user doesn't have the proper role or permissions to perform a specific action, but has properly authenticated. It accepts the following parameters:

| Parameter | Type | Description | Default |
Expand Down
Loading