Repository navigation
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
account/ui
Bug Description
When the server refuses a request to share, unshare or edit the permissions of a user-managed resource, the Account Console still shows "Resource successfully shared" (or the unshare/update success message). The user believes the change happened, and only a reload shows that nothing was stored.
Root cause: request() in js/apps/account-ui/src/api/request.ts is a plain fetch and returns the Respon
D2D2
se for any status. Reads pass it to parseResponse, which throws when response.ok is false, and deleteConsent and deleteSession in api/methods.ts check response.ok themselves. The two writes in js/apps/account-ui/src/api.ts, updateRequest and updatePermissions, return the raw response without checking it. Their callers in ShareTheResource.tsx, ResourcesTab.tsx and EditTheResource.tsx then never reach their catch block and call addAlert with the success message.
Version
26.6.4, 26.8.2 and main
Regression
No
Expected behavior
For a non-2xx response, updateRequest and updatePermissions throw, as deleteConsent and deleteSession do (if (!response.ok) { throw await parseResponse(response); }), and the console shows the error and its error_description.
Actual behavior
The request returns an error status, such as 404 for an unknown user or 403, and the console shows the success alert.
How to Reproduce?
- In a realm, enable User-Managed Access, create a confidential client with authorization enabled, and create a resource owned by user
alicewith "User-Managed access enabled". - Log in to the Account Console as
alice, open Resources, and share the resource with a username that does not exist, such asnobody. - The browser's network tab shows
PUT /realms/{realm}/account/resources/{id}/permissionsanswered with 404, and the console shows "Resource successfully shared". A reload shows the resource is not shared.
Anything else?
The fix is the same check in updateRequest and updatePermissions that deleteConsent and deleteSession already have.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsOpen
Activity
ahus1 commentedon Nov 24, 2026
I came across this one when testing UMA. While it is not blocking me, I want to show this error message in a demo. If the team doesn't have time for this, I'm happy to prepare a PR.