Skip to content

Report an error when sharing a resource fails in the account console - #55510

Open
Praiztl wants to merge 2 commits into
keycloak:mainfrom
Praiztl:fix/55488-account-console-share-error
Open

Praiztl wants to merge 2 commits into
keycloak:mainfrom
Praiztl:fix/55488-account-console-share-error

Conversation

@Praiztl

@Praiztl Praiztl commented Nov 25, 2026

Copy link
Copy Markdown

Closes #55488

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

Closes keycloak#55488

Signed-off-by: Tochukwu Chikezie <95018735+Praiztl@users.noreply.github.com>
@Praiztl
Praiztl marked this pull request as ready for review November 25, 2026 09:38
@Praiztl
Praiztl requested review from a team as code owners November 25, 2026 09:38
Copilot AI balanced review requested due to automatic review settings November 25, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 updateRequest and updatePermissions.
  • Uses parseResponse for 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

Comment on lines +57 to +58
if (!response.ok) {
throw await parseResponse(response);
@Praiztl

Praiztl commented Nov 25, 2026

Copy link
Copy Markdown
Author

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>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the resource-sharing and permission-update error-handling changes.

1 open issue

Review effort: Balanced

@stianst stianst added the kind/bug Categorizes a PR related to a bug label Nov 27, 2026
@stianst
stianst requested review from edewit and ssilvert December 2, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes a PR related to a bug team/core-iam

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account Console reports success when sharing a resource fails

3 participants