-
Notifications
You must be signed in to change notification settings - Fork 469
fix: add skip conditions for undefined environment ID queries #6557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
talissoncosta
merged 2 commits into
main
from
6534-fix-add-skip-conditions-for-undefined-environmentid-in-compareidentities-and-identityselect
Jan 20, 2026
Merged
fix: add skip conditions for undefined environment ID queries #6557
talissoncosta
merged 2 commits into
main
from
6534-fix-add-skip-conditions-for-undefined-environmentid-in-compareidentities-and-identityselect
Jan 20, 2026
+93
−75
Conversation
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
RTK Query hooks were making API requests with undefined/empty environment IDs, causing 404 errors like: - GET /api/v1/environments/undefined/edge-identities/ - GET /api/v1/environments//featurestates/ Added skip conditions to prevent queries from executing when required parameters are missing: - IdentitySelect: skip useGetIdentitiesQuery when environmentId is undefined - CompareIdentities: skip useGetProjectFlagsQuery when envId or projectId is missing, and skip useGetIdentityFeatureStatesAllQuery when environmentId is undefined Fixes #6534 Fixes FLAGSMITH-FRONTEND-2FM Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Docker builds report
|
…onment The fetch() method was being called from componentDidUpdate even when environmentRight was empty, causing API requests like: - GET /api/v1/environments//featurestates/?page_size=999 Added early return in fetch() when either environment is not selected. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Zaimwa9
approved these changes
Jan 20, 2026
Contributor
Zaimwa9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
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
IdentitySelectcomponent to skipuseGetIdentitiesQuerywhenenvironmentIdis undefinedCompareIdentitiescomponent to skipuseGetProjectFlagsQuerywhenenvIdorprojectIdis missinguseGetIdentityFeatureStatesAllQueryskip conditions to also check forenvironmentIdFixes #6534
Fixes FLAGSMITH-FRONTEND-2FM (35,290 events affecting 482 users)
Test plan
/environments/undefined/or/environments//paths[object Response]unhandled promise rejection errors