Actually I had develop the blazor webassembly application
In this application when the externalapi failed due to internet disconnected
at the time on blazor application UI shows the error like "One or more error
occured". whenever I had checked the error using inspect on browser
that is called "Failed load resource: :net:ERR_INTERNET_DISCONNECTED"
catch block not helpful for caught the exception or error because when
execution point came to the external api line at the time I got the error on
browser due to internet disconnected
I want to handle this error and need to show the custom message if internet
disconnected
please help me.
Thanks
Loading
Ramesh PPosted Jan 17, 2023, 3:09 PM
I don't want to checking internet avaliblity before make external api
I want to handle failed external api and show custom erroe message
Pasang TamangPosted Jan 17, 2023, 2:06 PM
Hi,
Please check this https://www.patrickrobin.co.uk/articles/showing-connection-status-in-blazor-webassembly/.
Another nice explanation about the similar requirement https://github.com/dotnet/aspnetcore/issues/22278#issuecomment-635968234
Regards,
Pasang