Tasker react on Errors?

Hi,
when I change a switch via tasker sometimes it doesn’t work (maybe no connection to the server)
I tried to catch the error with the %httpcode in tasker, but there comes nothing…
Any Ideas ?
Regards
Jörg