Miss understanding to use policy in read action, Handling Missing Actor
Hi sorry again, I've read the documentation multiple times but still struggle to properly handle a case in my
Here’s my current setup:
This works when a valid token (and therefore actor) is present. However, when I make a JSON API request without a token, I receive a generic 400 error like:
I want it to return a 403 Forbidden instead. So I tried this policy:
Now, when there’s no token, it correctly returns 403 Forbidden.
But unfortunately, when there is a token, I get a 404 Not Found instead:
Even when I adjusted the code further, I still get 404.
How can I ensure:
* 403 Forbidden is returned when no token is provided
* 200 OK (with user info) is returned when a valid token exists
instead of getting a 404?
By the way, my user is using
I think i miss a part

Thank you in advance
:me action.Here’s my current setup:
This works when a valid token (and therefore actor) is present. However, when I make a JSON API request without a token, I receive a generic 400 error like:
I want it to return a 403 Forbidden instead. So I tried this policy:
Now, when there’s no token, it correctly returns 403 Forbidden.
But unfortunately, when there is a token, I get a 404 Not Found instead:
Even when I adjusted the code further, I still get 404.
How can I ensure:
* 403 Forbidden is returned when no token is provided
* 200 OK (with user info) is returned when a valid token exists
instead of getting a 404?
By the way, my user is using
multitenancy global? trueI think i miss a part
Thank you in advance
Solution
Oh i changed my order of policies it shows :thinkies:
this was the last line of policies and i move
and i move top of
And for preventing warning of no actor
:thinkies:
this was the last line of policies and i move
and i move top of
And for preventing warning of no actor
:thinkies:
