I am creating a webApi to trigger a!completeTask(). If this encounters an error, I return an httpResponse to indicate such.
The question is: how do I know what the error was? Is there some way to return the task completion error in the webApi?
Thank you.
a!completeTask( taskId: ri!taskId, taskInputs: { someData: "abc", moreData: "def" }, onSuccess: a!httpResponse(200, {}, "Success") onError: a!httpResponse(500, {}, "What was the error??") )
Discussion posts and replies are publicly visible
You can work with the data the httpResponse sends by matching it with a user friendly message to show to user.
For detailed errors there is no way to show it directly using the response as that is available within log files.