Fixed network error handling

Signed-off-by: Conrad Bartels Daal <conrad@proxible.com>