I am trying to load my angular ui running on https://localhost:4200/index.html page in electron.
To achieve this, I am using below code to load the URL:
Window.loadURL("https://localhost:443/myapp/index.html")
I am able to catch the exception if that endpoint is not reachable or down through below code:
win.webContents.on("did-fail-load", (event, errorCode, errorDescription)=> {
console.log("Error occured.")
})
But I am facing issue if that endpoint is serving through gateway and gateway is retuning 503 http status. I am not able to cache 5XX http error response.
Could anyone please let me know how to catch the 5XX http status with window.loadURL() statement.