PCSAE · Question #104
The XSOAR administrator is writing an automation and would like to return an error entry back into XSOAR if a particular command errors out. How can this be achieved?
The correct answer is D. Using the return_error() function. To properly handle exceptions, wrap the commands with try/except in the main. The return_error() function receives error message and returns error entry back into Cortex XSOAR. https://xsoar.pan.dev/docs/integrations/code-conventions
Question
The XSOAR administrator is writing an automation and would like to return an error entry back into XSOAR if a particular command errors out. How can this be achieved?
Options
- AUsing the demisto_error() function
- BUsing a print statement
- CUsing the demisto.debug() function
- DUsing the return_error() function
How the community answered
(29 responses)- A3% (1)
- B10% (3)
- C3% (1)
- D83% (24)
Explanation
To properly handle exceptions, wrap the commands with try/except in the main. The return_error() function receives error message and returns error entry back into Cortex XSOAR. https://xsoar.pan.dev/docs/integrations/code-conventions
Topics
Community Discussion
No community discussion yet for this question.