Repository navigation
Conversation
Closes keycloak#55488 Signed-off-by: Tochukwu Chikezie <95018735+Praiztl@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Regression tests are missing for failed sharing and permission updates, leaving error-description display and suppression of success alerts on 404/403 responses unverified.
1 open issue
What changed in this PR
Fixes #55488 by making failed resource-sharing and permission-update requests reject, allowing the Account Console’s existing error handlers to display errors instead of success messages.
Changes:
- Adds HTTP status checks to
updateRequestandupdatePermissions. - Uses
parseResponsefor failed responses while preserving successful response returns.
| File | Description |
|---|---|
js/apps/account-ui/src/api.ts |
Adds error handling to resource-sharing and permission-update requests. |
Review effort: Balanced
| if (!response.ok) { | ||
| throw await parseResponse(response); |
|
Thanks for the review. The two write helpers now throw on a non-OK response, mirroring the existing deleteConsent and deleteSession helpers so the caller's error handling runs. A Playwright case for the 404/403 failure paths (asserting the error description is shown and no success alert appears) is reasonable follow-up; happy to add it if it should land in this PR. |
Signed-off-by: Tochukwu Chikezie <95018735+Praiztl@users.noreply.github.com>

Closes #55488
This pull request was created with the assistance of an AI agent.