Skip to content

[PROD RELEASE] - v6 tweaks - #862

Merged
jmgasper merged 3 commits into
masterfrom
develop
Nov 19, 2025
Merged

[PROD RELEASE] - v6 tweaks#862
jmgasper merged 3 commits into
masterfrom
develop

Conversation

@kkartunov

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/util.js
&& response.data.result.status === 200 && response.data.result.content
&& response.data.result.content.length === 1) {
return response.data.result.content[0];
if (response.data && response.status === 200 && response.data.length === 1) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from response.data.result.content to response.data assumes that the API response structure has changed. Ensure that this change is reflected across all parts of the application that consume this data, as it could lead to unexpected errors if other parts of the codebase still expect the old structure.

Comment thread src/util.js
}).then((res) => {
logger.debug(`Role info by ${roleId}: ${JSON.stringify(res.data.result.content)}`);
return _.get(res, 'data.result.content', []);
logger.debug(`Role info by ${roleId}: ${JSON.stringify(res.data)}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from res.data.result.content to res.data assumes a different response structure. Verify that this change is consistent with the API's documentation and that all consuming code is updated accordingly to prevent runtime errors.

Comment thread src/util.js
const roles = res.data;
logger.debug(`Roles by ${roleName}: ${JSON.stringify(roles)}`);
return roles.result.content
return roles

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from roles.result.content to roles assumes a different response structure. Ensure that this change is consistent with the API's documentation and that all consuming code is updated accordingly to prevent runtime errors.

Comment thread src/util.js
logger.debug(`Roles for user ${userId}: ${JSON.stringify(res.data.result.content)}`);
return _.get(res, 'data.result.content', []).map(r => r.roleName);
logger.debug(`Roles for user ${userId}: ${JSON.stringify(res.data)}`);
return (res.data || []).map(r => r.roleName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from res.data.result.content to res.data assumes a different response structure. Ensure that this change is consistent with the API's documentation and that all consuming code is updated accordingly to prevent runtime errors.

Comment thread src/util.js
.then((response) => {
const data = _.get(response, 'data.result.content', null);
if (!data) { throw new Error('Response does not have result.content'); }
const data = _.get(response, 'data', null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from response.data.result.content to response.data assumes a different response structure. Ensure that this change is consistent with the API's documentation and that all consuming code is updated accordingly to prevent runtime errors.

Comment thread src/util.js
.then((responses) => {
const data = responses.reduce((contents, response) => {
const content = _.get(response, 'data.result.content', []);
const content = response.data || [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from response.data.result.content to response.data assumes a different response structure. Ensure that this change is consistent with the API's documentation and that all consuming code is updated accordingly to prevent runtime errors.

@jmgasper
jmgasper merged commit 61861d5 into master Nov 19, 2025
1 of 2 checks passed
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.

2 participants