Skip to content

Skip and log invalid submission#2449

Open
rfontanarosa wants to merge 7 commits intomasterfrom
rfontanarosa/2083/loi-details-submission-list-ui-hangs-on-invalid-submission-data-when-showing-list
Open

Skip and log invalid submission#2449
rfontanarosa wants to merge 7 commits intomasterfrom
rfontanarosa/2083/loi-details-submission-list-ui-hangs-on-invalid-submission-data-when-showing-list

Conversation

@rfontanarosa
Copy link
Collaborator

closes #2083

@rfontanarosa rfontanarosa self-assigned this Mar 9, 2026
@auto-assign auto-assign bot requested a review from gino-m March 9, 2026 15:18
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the robustness of data conversion processes for Locations of Interest and Submissions. By introducing comprehensive error handling and more descriptive error messages, the system can now gracefully skip and log invalid data entries, preventing crashes and providing clearer insights into data integrity issues. This ensures that malformed data does not disrupt the application's operation while facilitating easier identification and resolution of data problems.

Highlights

  • Robust Data Conversion: Implemented try...catch blocks in data conversion functions for Locations of Interest (LOIs) and Submissions to gracefully handle invalid data.
  • Improved Error Logging: Enhanced error messages to provide more specific details when LOI or Submission data is invalid, aiding in debugging.
  • Comprehensive Submission Validation: Added explicit checks for the presence of created and lastModified audit information during submission data conversion.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • web/src/app/converters/loi-data-converter.ts
    • Wrapped the LOI data parsing and validation logic within a try...catch block.
    • Updated the error message for general conversion failures to be more concise and include the caught exception.
  • web/src/app/converters/submission-data-converter.ts
    • Enclosed the submission data parsing and validation within a try...catch block.
    • Added new validation checks to ensure created and lastModified audit information are present.
    • Modified the error message for general submission conversion failures to be more informative.
Activity
  • No activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request aims to improve error handling for invalid data by wrapping conversion logic in try-catch blocks. This is a good step, but there are two main issues with the current implementation. First, the return value of toMessage is not checked for Error instances, which can lead to misleading error messages instead of propagating the actual conversion error. This is a critical issue that should be addressed. Second, the new error handling in the catch blocks uses string interpolation for the caught error, which can lead to loss of important debugging information like stack traces. It's recommended to use the cause property of Error objects to properly chain errors. I've added specific comments with suggestions for both issues.

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 61.11111% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.01%. Comparing base (3227a7b) to head (56755f5).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...eb/src/app/converters/submission-data-converter.ts 66.66% 4 Missing ⚠️
web/src/app/converters/loi-data-converter.ts 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2449      +/-   ##
==========================================
+ Coverage   58.97%   59.01%   +0.03%     
==========================================
  Files         111      111              
  Lines        2747     2757      +10     
  Branches      408      412       +4     
==========================================
+ Hits         1620     1627       +7     
- Misses       1065     1068       +3     
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ist-ui-hangs-on-invalid-submission-data-when-showing-list
@rfontanarosa rfontanarosa marked this pull request as draft March 9, 2026 16:52
@rfontanarosa rfontanarosa marked this pull request as ready for review March 9, 2026 17:17
…ist-ui-hangs-on-invalid-submission-data-when-showing-list
Copy link
Collaborator

@gino-m gino-m left a comment

Choose a reason for hiding this comment

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

Please add/update tests.

@rfontanarosa rfontanarosa requested a review from gino-m March 12, 2026 19:19
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.

[LOI details / submission list] UI hangs on invalid submission data when showing list

3 participants