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

Validate non-null json #76

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Conversation

jworkmanjc
Copy link
Contributor

@jworkmanjc jworkmanjc commented Jun 17, 2024

Issues

  • CUT-4136 - Validate Json response before converting

What does this solve?

When previously generated versions of the module encountered what was known to be a json response from an endpoint, the functions would convert that response from json without validating the response was non-null. This version of the tool now validates that the response is non-null before attempting to convert the response.

Previous versions of the module work error when the response was null. Now, the functions should just return nothing if the requested data does not exist.

Is there anything particularly tricky?

How should this be tested?

Screenshots

Previous response:
Screenshot 2024-06-17 at 1 27 28 PM

expected result:
Screenshot 2024-06-17 at 1 27 50 PM

@jworkmanjc jworkmanjc added patch Patch SDK Release Version SDK SDK Release Label labels Jun 17, 2024
Copy link
Contributor

@gweinjc gweinjc left a comment

Choose a reason for hiding this comment

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

Looks good, tests well in my org. Quick fix, nice job!

@jworkmanjc jworkmanjc merged commit 06765e4 into master Jun 17, 2024
12 checks passed
@jworkmanjc jworkmanjc deleted the CUT-4136_Get_JCEvent_null_error branch June 17, 2024 21:28
@jworkmanjc jworkmanjc deployed to PublishToPSGallery June 17, 2024 21:29 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch SDK Release Version SDK SDK Release Label
Development

Successfully merging this pull request may close these issues.

3 participants