Executes the registered handler for the given task ID with the provided context.
if no handler is registered for id.