Skip to content

fix(api): restore username suggestion on identity errors - #1490

Open
MuhammadFaizan-prog wants to merge 1 commit into
RocketChat:developfrom
MuhammadFaizan-prog:fix/1489-username-suggestion-response
Open

MuhammadFaizan-prog wants to merge 1 commit into
RocketChat:developfrom
MuhammadFaizan-prog:fix/1489-username-suggestion-response

Conversation

@MuhammadFaizan-prog

Copy link
Copy Markdown
Contributor

Summary

Fixes #1489. The REST SDK can reject with an HTTP Response. Read the JSON for HTTP 400 errors before matching the identity error so the existing username suggestion is shown. Preserve the existing behavior for other failures and malformed bodies.

Validation

  • corepack yarn install --immutable passed.
  • corepack yarn format:check and corepack yarn lint passed.
  • corepack yarn build --concurrency 2 and corepack yarn build:storybook passed.
  • node --test packages/api/test/username-suggestion.test.mjs passed (5 tests).
  • corepack yarn workspace e2e-react exec playwright test --reporter=line passed (2 tests).
  • git diff --check HEAD^ HEAD passed.

Prepared with AI assistance (Hark) for the fix and regression tests.

Signed-off-by: Muhammad Faizan <130775084+MuhammadFaizan-prog@users.noreply.github.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Bug: username fallback in updateUserUsername never runs since the ddp-client migration

1 participant