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.
I'm not sure what you mean. I was looking for reasons why completeTask, itself, might end up calling the onError bit. If there was some kind of error I could report in the HttpResponse.
I'm working at the WebApi level here, not the caller of the WebApi.
Thanks.