Generic error messages from status codes.

This commit is contained in:
Michael Jumper
2012-03-24 19:13:32 -07:00
parent e6249fbf5b
commit b80ede52a4

View File

@@ -207,10 +207,15 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
var status = xmlhttprequest.status; var status = xmlhttprequest.status;
if (status >= 200 && status <= 299) return "Success"; // Special cases
if (status >= 400 && status <= 499) return "Unauthorized"; if (status == 200) return "Success";
if (status >= 500 && status <= 599) return "Connection lost"; if (status == 403) return "Unauthorized";
if (status == 404) return "Connection does not exist";
// Internal server errors
if (status >= 500 && status <= 599) return "Server error";
// Otherwise, unknown
return "Unknown error"; return "Unknown error";
} }