Treat internal server error as networking related issue, fixes #984 (lib)