The response body is probably not a valid numeric string. Post its value.
How to fix Unhandled exception rendering component: The JSON value could not be converted to System.Int32.
tony kong
0
Reputation points
When I use the PlaceOrder method, it causes this error. The version is 8.0. Thank you.
async Task PlaceOrder()
{
isSubmitting = true;
var response = await HttpClient.PostAsJsonAsync(NavigationManager.BaseUri + "orders", OrderState.Order);
var newOrderId = await response.Content.ReadFromJsonAsync<int>();
OrderState.ResetOrder();
NavigationManager.NavigateTo("/");
}