Skip to content

fix: current device logout showing error#40351

Draft
juliajforesti wants to merge 2 commits intodevelopfrom
fix/current-device-logout
Draft

fix: current device logout showing error#40351
juliajforesti wants to merge 2 commits intodevelopfrom
fix/current-device-logout

Conversation

@juliajforesti
Copy link
Copy Markdown
Contributor

@juliajforesti juliajforesti commented Apr 30, 2026

CORE-2033

Proposed changes (including videos or screenshots)

issue:

  • calling the logout API endpoint /v1/sessions/logout.me triggered a refetch of the device list
  • at that point the user was already logged out, causing a 401 authentication error
  • the 401 error displayed the "Something went wrong" page briefly before redirecting to login

solution:

  • Conditional query invalidation:
    • detect when logging out own session (/v1/sessions/logout.me) vs logging out other users' sessions
    • for own session logout, skip query invalidation entirely since the user is being logged out anyway
  • Add throwOnError: false to the mutation to prevent errors from reaching React error boundaries

Issue(s)

Steps to test or reproduce

Further comments

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Apr 30, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: ec33ad7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-video-conf Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eb6dde98-b4a5-416f-9238-f7ef2c2e5217

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.85%. Comparing base (981af32) to head (ec33ad7).
⚠️ Report is 20 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40351      +/-   ##
===========================================
- Coverage    69.86%   69.85%   -0.02%     
===========================================
  Files         3298     3298              
  Lines       119347   119357      +10     
  Branches     21530    21522       -8     
===========================================
- Hits         83377    83371       -6     
- Misses       32672    32684      +12     
- Partials      3298     3302       +4     
Flag Coverage Δ
e2e 59.77% <29.41%> (-0.02%) ⬇️
e2e-api 46.21% <ø> (-0.03%) ⬇️
unit 70.60% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant