Hello everyone,
I encountered some issues while working with the Keycloak API, and I believe improving the documentation and error handling could benefit others as well.
1. Documentation Update for POST /admin/realms/{realm}/groups/{group-id}/role-mappings/realm
In the Body Parameter, RoleRepresentation, I didn’t know it must be an array. The documentation does not clearly state this, which caused some confusion.
2. Error Handling in Client Endpoints
When I input an invalid field while creating a client, I encountered a 409 Conflict error with a very unclear error message, such as:
{
"error": "unknown_error"
}
In my case, I was trying to enable serviceAccountsEnabled
, but it kept throwing an unknown error. After numerous attempts, I discovered that adding publicClient: false
resolved the issue and the error no longer appeared.
It would be great if there could be improvements in error handling and more detailed documentation in some areas.
Thank you!