Describe the bug
member this.AsyncAcquireTokenInteractively (uiThread, correlationId) = asyncResult {
do! Async.SwitchToContext uiThread
let builder =
pca.AcquireTokenInteractive(options.Scopes)
.WithCorrelationId(correlationId)
if not (isNull configureInteractive) then configureInteractive.Invoke(builder)
try return! builder.ExecuteAsync() // FSharp.Control.FusionTasks is used not to write |> Async.AwaitTask
with :? MsalClientException as ex -> return! Error ex.ErrorCode
}
Matching by the MsalClientException does not happen as it is wrapped by the AggregateException.
To Reproduce
Steps to reproduce the behavior:
- Call Task returning method via
return! in an asyncResult CE
- Catch exception
- You will see that it is always the
AggregateException.
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Describe the bug
Matching by the
MsalClientExceptiondoes not happen as it is wrapped by theAggregateException.To Reproduce
Steps to reproduce the behavior:
return!in anasyncResultCEAggregateException.Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):