Unexpected error while evaluating permissions

I have been using this request in order to retrieve permissions associated with logged in users:

POST {base_url}/auth/realms/{realm_name}/protocol/openid-connect/token
– data grant_type=urn:ietf:params:oauth:grant-type:uma-ticket
– audience={resource_server_client_id}

Up until now this has been working like a charm, but suddenly out of the blue this requests fails with.
500: {
“error”: “server_error”,
“error_description”: “Unexpected error while evaluating permissions”

We are using keycloak version 12.0.4 in our test-environment, and 10.0.1 in production environment. The problem occurs in both environments.

Does anyone know why this happens? Please help me