io.try()
allows you to run Tasks and catch any errors that are thrown, it’s similar to a normal try/catch
block but works with io.runTask().
try/catch
block on its own won’t work as expected with Tasks. Internally runTask()
throws some special errors to control flow execution. This is necessary to deal with resumability, serverless timeouts, and retrying Tasks.
catch
errors inside run()
io.try()
function documented on this page.try/catch
block and isTriggerError to check if the error is a special error type.