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

Created "LogFailure" method for OmniStudioRemoteAction class to be used by IP TryCatchBlock #91

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

j-fischer
Copy link
Owner

Created "LogFailure" method for OmniStudioRemoteAction class that should be used when dealing with try-catch blocks in Integration Procedures.

…uld be used when dealing with try-catch blocks in Integration Procedures.
@j-fischer j-fischer added the enhancement New feature or request label Oct 8, 2024
@j-fischer j-fischer added this to the RFLIB 7.3 milestone Oct 8, 2024
…og messages are not swallowed by the runtime.
@j-fischer
Copy link
Owner Author

Hey @jongpie,

Take a look at this PR. The reason why I created these changes is that I was working on a project with RFLIB and OmniStudio and ran into an issue. During the debugging I noticed that a TryCatchBock in an Integration Procedure did fail but did not create any log message due to the missing attributes that my Omni Logger Action expected. This was the configuration below, but nothing showed up in the logs.

image

The changes in this PR will make the handling of this scenario more robust, making sure some Log Event is created, whether the existing LogMessage method is used (less ideal) or better, the LogFailure method is used instead (see below). What happens in the try-catch scenario is that the IP just dumps the entire state JSON as an input since it does not allow you to add any additional attributes.

image

I looked over your code in Nebula and believe that you might have some unexpected behaviour in this situation as well. I am not 100% sure because you look at a lot more input attributes than RFLIB, so I just wanted to point this issue out to you just to be safe. I hope you already got it covered and, if not, that this PR will help you add the appropriate handling in Nebula.

Cheers!

@j-fischer j-fischer merged commit f385355 into master Oct 9, 2024
6 checks passed
@j-fischer j-fischer deleted the feature/omni-ip-try-catch branch October 9, 2024 04:32
@jongpie
Copy link
Contributor

jongpie commented Oct 10, 2024

@j-fischer thanks for the mention! I am still... incredibly new to using OmniStudio (my only real experience with it was when adding support in Nebula Logger 😅 ), so I wasn't even aware of the TryCatchBock in IP - I definitely haven't tested this out in Nebula Logger yet. I'll try to spin up an OmniStudio this weekend to test this & see if I need to fix anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants