New error handling for network calls

This is to try and prevent the web server's idea of the worker's status from being inaccurate by making the worker more persistent.