Skip to content

Conversation

@UtkarshMishra-Microsoft
Copy link
Contributor

Purpose

  • ...
    This pull request improves error handling and data validation in the getUserInfo function in src/frontend/src/api/api.ts. The changes ensure that user info is parsed more robustly and that errors during the fetch process are handled gracefully.

Error handling and data validation improvements:

  • Wrapped the fetch call in a try-catch block to handle network or parsing errors, logging any issues and returning an empty array if an error occurs.
  • Added logic to validate the payload and construct a normalized UserInfo object, ensuring required fields are present and fallback values are used if necessary.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

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

Deployment Validation

  • 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

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