Skip to content

Commit bae9697

Browse files
committed
revert & comment
1 parent 8f9fc26 commit bae9697

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

flagsmith-jira-app/src/backend/flagsmith.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ export const readFeatures: ReadFeatures = async ({ projectIds, environmentId })
174174

175175
const allFeatures: Feature[] = [];
176176
const organisationId = await readOrganisationId();
177+
178+
// TODO: consider ways to avoid multiple API calls
179+
// relates to https://github.com/Flagsmith/flagsmith-jira-integration/issues/22
180+
// When an RBAC API key is in use, there is no need for the backend to retrieve projects for filtering as any API call to a project ID that isn't permitted will cause an auth error.
177181
const projects = await readProjects({ organisationId });
178182

179183
for (const projectId of projectIds) {

flagsmith-jira-app/src/frontend/components/IssueFeatureTables.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ const IssueFeatureTable = ({
168168
api_key: String(environment.api_key),
169169
};
170170
} catch (err) {
171+
console.warn(
172+
`Failed to read feature state for environment "${environment.name}" (${environment.id})`,
173+
{
174+
featureName,
175+
apiKey: environment.api_key,
176+
error: err instanceof Error ? err.message : String(err),
177+
},
178+
);
171179
return null;
172180
}
173181
}),

0 commit comments

Comments
 (0)