Is your feature request related to a problem? Please describe.
When io.runTask runs, it has an onError callback option. This is great!
But I have some async logic that I would like to run in this error callback. This is currently not supported since the error callback cannot return a promise.
Describe the solution you'd like to see
Update RunTaskErrorCallback type to allow returning a promise, and update io.runTask to await onError(error, task, this)
Describe alternate solutions
Do nothing and tell developers to try/catch inside the io.runTask (where it is async):
Is your feature request related to a problem? Please describe.
When
io.runTask
runs, it has anonError
callback option. This is great! But I have someasync
logic that I would like to run in this error callback. This is currently not supported since the error callback cannot return a promise.Describe the solution you'd like to see
Update
RunTaskErrorCallback
type to allow returning a promise, and updateio.runTask
toawait onError(error, task, this)
Describe alternate solutions
Do nothing and tell developers to
try
/catch
inside theio.runTask
(where it isasync
):Additional information
No response