Throw error if trying to return value in worker