Repository navigation
Sign out when the account is gone, instead of the generic error screen - #121
Merged
Merged
Conversation
…red token The API looks up the organization in the path before the token. A free account has only its personal organization, which goes with the account (deleted by the user, or by the public demo after 30 unused days), so a saved session for it gets account_not_found, never devise_token_auth's 401, and the app kept failing every request. Service now announces that 404 as an expired session too, so the app signs out and says to sign in again. Found on 2026-10-28 with the paid app (same fix in NativeAppTemplate-iOS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dadachi
added a commit
that referenced
this pull request
Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
[NATIVEAPPTEMPLATE-2001].AccountNotFoundController) before the token, so the answer isaccount_not_found(404), not devise_token_auth's 401. The free edition did not handleaccount_not_foundat all:Servicenow posts.apiSessionDidExpirefor it, like a rejected token.Test plan
make lint, full test suite (ServiceTest.deletedAccountIsAnnouncedAsAnExpiredSession, and a 404 without the code is not)🤖 Generated with Claude Code