Skip to content

Clarify that ForbiddenError custom messages are not included in API responses#3322

Open
ww24 wants to merge 1 commit into
strapi:mainfrom
ww24:cms/clarify-forbidden-error-behavior
Open

Clarify that ForbiddenError custom messages are not included in API responses#3322
ww24 wants to merge 1 commit into
strapi:mainfrom
ww24:cms/clarify-forbidden-error-behavior

Conversation

@ww24

@ww24 ww24 commented Jul 5, 2026

Copy link
Copy Markdown

Description

  • Added a note admonition to the ForbiddenError tab in error-handling.md.
  • Clarifies that custom messages passed to ForbiddenError are not included in the API response.
  • Recommends using PolicyError if a custom error message indicating insufficient permissions needs to be returned.
  • Updated the auto-generated LLM reference files (llms-code.txt and llms-full.txt) to keep them in sync.

See https://github.com/strapi/strapi/blob/e2975f5915e497cee4c1c75314c555a45777f79b/packages/core/core/src/services/server/compose-endpoint.ts#L46-L52.

Related issue(s)/PR(s)

N/A

@strapi-cla

strapi-cla commented Jul 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Jul 5, 2026 1:06pm

Request Review

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

👋 Thank you so much for contributing to the Strapi documentation!

Our team is currently away and won't be able to review your pull request right away. Rest assured we'll get to it as soon as we're back. Thanks a lot for your patience! 🙏

@ww24 ww24 marked this pull request as ready for review July 5, 2026 13:11
@ww24 ww24 requested a review from pwizla as a code owner July 5, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants