Repository navigation
Conversation
Contributor
Author
|
Closing: the roles endpoint stays on v2.1.0. |
simonredfern
pushed a commit
that referenced
this pull request
Oct 30, 2026
Each was found by resolving every call site in this repository against OBP-API's published resource-docs, and each was confirmed against a live develop-obp (3df73fe11) with the verb held constant, so none of them is the 404-for-a-wrong-verb ambiguity. Portal, accepting a user invitation (#5) obp_requests.put -> post. /obp/v4.0.0/banks/{id}/user-invitation is POST-only at v4.0.0 and v6.0.0 alike; PUT answers 404 OBP-10404 while POST answers 401. The same file already POSTs the sibling /user-invitations path correctly, and API-Manager POSTs this one correctly, so the convention was established in two other places and only this call site diverged. Fixing the verb alone did not make the flow work, which the new test caught: the redirect was thrown inside the try, and the catch-all below it turns anything that is not an OBPRequestError into "Failed to create account: Unknown error". redirect() signals by throwing, so a successful account creation reported failure. The redirect now returns after the try/catch, matching what the register action already does. Portal, removing a chat reaction (#6) The emoji moves from the DELETE body into the path: OBP-API serves .../reactions/{emoji} for DELETE and only POST/GET on .../reactions. The response is now checked with res.ok, mirroring the add branch immediately below it. fetch does not reject on 4xx, so the old try/catch could not see the failure -- the reaction vanished from the UI, stayed in the database, and returned on reload with nothing logged. The add path was already correct and is untouched. API-Manager, creating a custom view (#7) routes/backend/obp/banks/[bank_id]/views/+server.ts is deleted rather than repaired. It targets /obp/v6.0.0/banks/{id}/views, which OBP-API does not serve at any verb -- every view endpoint is account-scoped -- and nothing calls it: the custom-view page posts to the account-scoped route next to it, which builds the correct URL. It was a copy of a working route with the account segment dropped. Adds apps/portal/src/routes/user-invitation/page.server.test.ts, following the pattern of the register action's test. It asserts the verb rather than only the URL, which is what lets it fail if this regresses, and it is what surfaced the swallowed redirect. Verified: portal 86/86 unit tests pass, api-manager 15/15. svelte-check is unchanged against the base commit on both apps (portal 21 errors/70 warnings, api-manager 22/332), so no new type errors. Both apps build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /obp/v2.1.0/rolesto list available roles.OBP_API_ENABLED_VERSIONS=[OBPv4.0.0 ... OBPv7.0.0,dynamic-entity]) returnOBP-10404: 404 Not Foundfor that URL, and the consent card shows the error./rolesis defined in v2.1.0 but newer versions inherit it, so/obp/v7.0.0/rolesserves the same endpoint (sameroles[].roleandrequires_bank_idfields). On such a deployment/obp/v7.0.0/rolesanswers 401 without a token (route exists) while/obp/v2.1.0/rolesanswers 404.Changes
packages/shared/src/lib/server/opey/consentHandler.ts:/obp/v2.1.0/roles->/obp/v7.0.0/rolesapps/portal/src/routes/backend/obp/roles/+server.ts:/obp/v2.1.0/roles->/obp/v7.0.0/rolesTest plan