diff --git a/docusaurus/docs/cms/error-handling.md b/docusaurus/docs/cms/error-handling.md index e6cb5e449f..5c0fbc95ad 100644 --- a/docusaurus/docs/cms/error-handling.md +++ b/docusaurus/docs/cms/error-handling.md @@ -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. +::: + diff --git a/docusaurus/static/llms-code.txt b/docusaurus/static/llms-code.txt index 18c54f004c..9f5f7b9538 100644 --- a/docusaurus/static/llms-code.txt +++ b/docusaurus/static/llms-code.txt @@ -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. +::: + diff --git a/docusaurus/static/llms-full.txt b/docusaurus/static/llms-full.txt index aaed22e3c7..f945d57e84 100644 --- a/docusaurus/static/llms-full.txt +++ b/docusaurus/static/llms-full.txt @@ -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 |