noMatchingRole with GraphQL and error handling

Hello,
I’am playing arround with AppServices and GraphQL. I created a rule to grant (or not) documents to be searched if the user does not have a specific role. This role is extracted from a JWT custom claim and stored in the user provider data.

Then I created a simple rule like that :

{
  "%%user.data.role": "mflix-advanced"
}

So that works fine. If my JWT token has a role property that is “mflix-advanced” the GraphQL query replies an http 200 with my data.

But if my token does not have the “mflix-advanced” role, the GraphQL query replies also an http 200 with an empty data array …

Is there a way to configure AppService to reply another http code (401 for example) if there’s a noMatchingRole error ? Because I have no way to differentiate the case where there is no data of the case where the user has not the required permission.

Thank you