Skip to content

Conversation

@jtquach1
Copy link

@jtquach1 jtquach1 commented Jul 31, 2024

Describe your changes

Please include a summary of the changes and the related issue/task. Please also include relevant motivation and context. List any dependencies that are required for this change, including links to other pull requests/branches in other repositories if applicable.

Added ? after fields that are possibly undefined, so when subfields are accessed under those fields, the request-generator doesn't crash. The crashing is caused by trying to access an undefined object or undefined array at index 0. This isn't a code refactoring/overhaul PR, though.

Issue ticket number and Jira link

Please include the Jira Ticket Number and Link for this issue/task.

N/A, found randomly while doing https://jira.mitre.org/browse/REMS-712.

To reproduce:

  • In pims: use Node v21.7.3, checkout origin/dev, clear all orders from PIMS. Using branch update-etasu-check-to-use-intermediary also works, but that's because the "Send Rx" functionality hits a different endpoint than what the latter branch modifies.
  • In request-generator: use this branch, select Jon Snow/Turalio, and click the "Send Rx" button.
  • In rems-intermediary: use mongo-schema or mongo-update-standardization (I used the latter branch with Docker).
  • In rems-smart-on-fhir: doesn't matter
  • In test-ehr: used origin/dev

Checklist before requesting a review

  • I have performed a self-review of my code
  • Ensure the target / base branch for any feature PR is set to dev not main (the only exception to this is releases from dev and hotfix branches)

Checklist for conducting a review

  • Review the code changes and make sure they all make sense and are necessary.
  • Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to.

Workflow

Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.

@jtquach1 jtquach1 changed the title Resolve typeerror crashes Resolve TypeError crashes Jul 31, 2024
@plarocque4 plarocque4 self-assigned this Aug 1, 2024
@plarocque4 plarocque4 merged commit bb05210 into dev Aug 2, 2024
@plarocque4 plarocque4 deleted the resolve-typeerror-crashes branch August 2, 2024 18:56
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.

3 participants