Skip to content
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

fix: update history method changes #295

Merged
merged 1 commit into from
Jan 30, 2025
Merged

fix: update history method changes #295

merged 1 commit into from
Jan 30, 2025

Conversation

pradeepjha-microsoft
Copy link
Contributor

Purpose

This pull request includes changes to the ClientAdvisor/App/frontend/src/api/api.ts file to add a new utility function and improve error handling in the historyUpdate function. The most important changes are:

Enhancements to error handling and utility functions:

  • Added a new utility function isLastObjectNotEmpty to check if the last object in an array is not empty. This function is used to handle cases where the array might be empty or the last object in the array is empty.
  • Updated the historyUpdate function to use the isLastObjectNotEmpty utility function to determine whether to proceed with the update or return an error response. If the last object in the messages array is empty, the function now returns a 500 Internal Server Error response.

Does this introduce a breaking change?

  • Yes
  • [X ] No

Golden Path Validation - NA

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation - NA

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit 2adf389 into dev Jan 30, 2025
6 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