Skip to content

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

Merged
pwizla merged 1 commit into
strapi:mainfrom
ww24:cms/clarify-forbidden-error-behavior
Jul 15, 2026
Merged

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

Conversation

@ww24

@ww24 ww24 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @ww24
The PR is now approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

@pwizla pwizla self-assigned this Jul 15, 2026
@pwizla pwizla added pr: chore source: CMS contribution PRs that are part of the Documentation Contribution Program labels Jul 15, 2026
@pwizla pwizla added this to the 7.1.0 milestone Jul 15, 2026
@pwizla
pwizla merged commit 082c592 into strapi:main Jul 15, 2026
5 checks passed
@ww24
ww24 deleted the cms/clarify-forbidden-error-behavior branch July 16, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution PRs that are part of the Documentation Contribution Program pr: chore source: CMS

3 participants