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

Handle json parsing exception for system alerts #2749

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ciaranschutte
Copy link
Contributor

Description of changes

handles JSON parsing exceptions when getting local storage
fixes infinite loop when exception is thrown with no item found: JSON.parse('') '' is not a valid JSON string
additionally checks if parsed value is array as expected by the component

Type of Change

  • Bug
  • Dependency updates
  • Feature
  • Refactoring
  • Release candidate
  • Styling
  • Testing
  • Other (please describe)

Checklist before requesting review

  • Design (select one):
    • Matches design:
      • component sizes, spacing, and styles
      • font size, weight, colour
      • spelling has been double checked
    • No design provided, screenshot of changes included in PR
    • No changes to UI
  • Back-end (select one):
    • Back-end PRs merged, tested on develop, and linked in this PR
    • No back-end changes
  • Manually tested changes
  • Added copyrights to new files
  • Connected ticket to PR

@ciaranschutte ciaranschutte marked this pull request as ready for review December 17, 2023 13:39
@ciaranschutte ciaranschutte changed the title handle parsing exceptions Handle json parsing exception for system alerts Dec 17, 2023
@samrichca samrichca removed their request for review April 4, 2024 14:07
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