Skip to content

removing-redundant-safeJsonParse#1745

Open
teg-atlassian wants to merge 5 commits intomainfrom
removing-redundant-safejaonparse
Open

removing-redundant-safeJsonParse#1745
teg-atlassian wants to merge 5 commits intomainfrom
removing-redundant-safejaonparse

Conversation

@teg-atlassian
Copy link
Copy Markdown
Contributor

@teg-atlassian teg-atlassian commented Mar 19, 2026

What Is This Change?

This is a refactoring PR where by we removes a redundant 'safeJsonPar

How Has This Been Tested?

  • new tests

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

  • If Atlassian employee & Bitbucket changes: did you test with DC in mind? See Instructions

Recommendations:

  • Update the CHANGELOG if making a user facing change

Rovo Dev code review: Rovo Dev couldn't review this pull request
Upgrade to Rovo Dev Standard to continue using code review.

@teg-atlassian teg-atlassian changed the title refactor safeJsonParse removing-redundant-safejaonparse Mar 19, 2026
@teg-atlassian teg-atlassian changed the title removing-redundant-safejaonparse removing-redundant-safeJsonParse Mar 19, 2026
const jsonArgs = React.useMemo(() => {
try {
return safeJsonParse(toolArgs);
return safeJsonParse(toolArgs) ?? {};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the point of safeSomething is that you don't need a try/catch for it 😆

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i now updated the safeJsonParse method to handle the potential exception that could be thrown

marcomura
marcomura previously approved these changes Mar 23, 2026
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