The following code throw the following exception:
await(awaitthis._userManagementService.GetUserInfo()).WhenError().MapTo(
statusCode =>Task.FromResult(newHttpResponseMessage{StatusCode=statusCode})).WhenSuccess().MapTo(async email =>awaitthis.Post("tenant/setup",tenantId,new[]{email})).Map();System.InvalidCastException: Unable to cast object of type 'SolidStack.Core.Flow.Internal.Result.UnresolvedMappableError`3[System.Net.HttpStatusCode,Smo365Api.Services.Dtos.User.UserInfo,System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage]]' to type 'SolidStack.Core.Flow.Internal.Result.ResolvedMappableSuccess`3[System.Net.HttpStatusCode,Smo365Api.Services.Dtos.User.UserInfo,System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage]]'.\r\n at SolidStack.Core.Flow.Internal.MappableContent`3.TryUseLastMapping()\r\n at SolidStack.Core.Flow.Internal.Result.UnresolvedMappableError`3.WhenSuccess()\r\n
But this code don't:
await(awaitthis._userManagementService.GetUserInfo()).WhenSuccess().MapTo(async email =>awaitthis.Post("tenant/setup",tenantId,new[]{email})).WhenError().MapTo(
statusCode =>Task.FromResult(newHttpResponseMessage{StatusCode=statusCode})).Map();
The following code throw the following exception:
But this code don't: