strapi / documentation

Strapi Documentation
https://docs.strapi.io
Other
1.01k stars 1.07k forks source link

Default error classes confuse Unauthorized & Forbidden #2127

Closed sopwerdna closed 2 months ago

sopwerdna commented 2 months ago

Link to the documentation page or resource

https://docs.strapi.io/dev-docs/error-handling#default-error-classes

Describe the bug

I believe all behavior is correct, however the descriptions of Unauthorized (a.k.a. HTTP 401) and Forbidden (HTTP 403) are swapped. See lines https://github.com/strapi/documentation/blob/013e02fe9350050f401019c5fcb0aabbea4cc10f/docusaurus/docs/dev-docs/error-handling.md?plain=1#L402 and https://github.com/strapi/documentation/blob/013e02fe9350050f401019c5fcb0aabbea4cc10f/docusaurus/docs/dev-docs/error-handling.md?plain=1#L418

Additional context

No response

Suggested improvements or fixes

Swap them and/or possibly link out to MDN's helpful pages: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 & https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403

Related issue(s)/PR(s)

No response

pwizla commented 2 months ago

Thank you for reporting, @sopwerdna. I'll check with the Strapi core engineering team and get back to you.

pwizla commented 2 months ago

Thank you again for reporting, @sopwerdna! I've just updated the docs.

sopwerdna commented 2 months ago

Thank you for the quick fix!