Fork me on GitHub
#cljsrn
<
2019-11-22
>
lepistane15:11:55

Hi, How do you guys deal with exceptions? I am using Sente for communication between app and backend but if backend is not online or wifi/mobile data is off i get red screen with

console.error: "ERROR [taoensso.sente:1058] - WebSocket error: [object Object]"
What i would like to have is some kind of modal/popup that says 'server error, restart the app' or something instead of it breaking like this. Does anyone have any suggestion?

joshmiller15:11:34

I have an :http re-frame fx that accepts an :on-failure key and also has a default :http-no-on-failure fx when one isn’t supplied. I’m not sure how that would work with Sente though, I haven’t used it.

lepistane15:11:23

i think this is one is not on re-frame lvl If there is no wifi/mobile data or backend is off exception will be thrown and i wanna handle those gracefully