Try/Catch Wrap Around Task.Run not Handling Exception
This is just a misleading debugger message.
What's actually happening is that the exception is being thrown, then caught by the .NET framework (not user code), and then placed on the task.
So, while technically the error message is correct (it's caught by the .NET framework - unhandled by user code), it's not very helpful in this case.
Unfortunately, there's also not a lot of alternatives for the debugger. At the point when the exception leaves user code, the debugger has no way of "looking into the future" to know that the exception will be placed on a specific task and that your code will await
that task. It has to make a decision immediately whether to notify you or not, without knowing whether the task will be await
ed.