Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating subgroups results in raised exception for 204 No Content #475

Open
kereis opened this issue Aug 8, 2023 · 0 comments
Open

Creating subgroups results in raised exception for 204 No Content #475

kereis opened this issue Aug 8, 2023 · 0 comments

Comments

@kereis
Copy link

kereis commented Aug 8, 2023

When using KeycloakAdmin.create_group() with a set parent= parameter in order to create subgroups, the method raises an exception even if the operation is successful. This is because the API returns HTTP status code 204 No content, which KeycloakAdmin does not expect.

raise_error_from_response(
data_raw, KeycloakPostError, expected_codes=[201], skip_exists=skip_exists
)

You'd probably just have to add 204 to expected_codes in order to fix that issue. I can create a PR if that fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant