Ramesh P

Ramesh P

  • 1.6k
  • 14
  • 537

How to handle the error when the api failed due to internet disconnect

Jan 17 2023 12:54 PM

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


Answers (2)