Replies: 1 comment
-
Indeed, you use an antipattern, the access control functions need to return a boolean. I think it is because of the server side rendering in Next.js, the error is thrown server side while rendering and fetching the page. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using Access Control (for collections) in
v2
I can throw errors to return (in api response) specified status codes and error messages:I tried the same way in

v3
(latest v3.6.0) and api works the same asv2
(and as I expected). But admin panel was completely broken: any page (from/admin
route) throws errors during Next.js rendering stage because of calling all access methods from all collections (for determine access privileges, I think).Is it possible to throw errors in access methods in
v3
? Or I originally used anti-pattern inv2
and shouldn't throw any errors in collection access methods?Beta Was this translation helpful? Give feedback.
All reactions