src/Tunnel.js
function getGuacamoleStatusCode(httpStatus) {

        // Translate status codes with known equivalents
        switch (httpStatus) {

            // HTTP 400 - Bad request
            case 400:
                return Guacamole.Status.Code.CLIENT_BAD_REQUEST;

            // HTTP 403 - Forbidden
            case 403:
                return Guacamole.Status.Code.CLIENT_FORBIDDEN;

            // HTTP 404 - Resource not found
            case 404:
                return Guacamole.Status.Code.RESOURCE_NOT_FOUND;

            // HTTP 429 - Too many requests
            case 429:
                return Guacamole.Status.Code.CLIENT_TOO_MANY;

            // HTTP 503 - Server unavailable
            case 503:
                return Guacamole.Status.Code.SERVER_BUSY;

        }

        // Default all other codes to generic internal error
        return Guacamole.Status.Code.SERVER_ERROR;

    }
function getGuacamoleStatusCode(httpStatus) {

        // Translate status codes with known equivalents
        switch (httpStatus) {

            // HTTP 400 - Bad request
            case 400:
                return Guacamole.Status.Code.CLIENT_BAD_REQUEST;

            // HTTP 403 - Forbidden
            case 403:
                return Guacamole.Status.Code.CLIENT_FORBIDDEN;

            // HTTP 404 - Resource not found
            case 404:
                return Guacamole.Status.Code.RESOURCE_NOT_FOUND;

            // HTTP 429 - Too many requests
            case 429:
                return Guacamole.Status.Code.CLIENT_TOO_MANY;

            // HTTP 503 - Server unavailable
            case 503:
                return Guacamole.Status.Code.SERVER_BUSY;

        }

        // Default all other codes to generic internal error
        return Guacamole.Status.Code.SERVER_ERROR;

    }
function getGuacamoleStatusCode ( httpStatus ) { // Translate status codes with known equivalents switch ( httpStatus ) { // HTTP 400 - Bad request case 400 : return Guacamole . Status . Code . CLIENT_BAD_REQUEST ; // HTTP 403 - Forbidden case 403 : return Guacamole . Status . Code . CLIENT_FORBIDDEN ; // HTTP 404 - Resource not found case 404 : return Guacamole . Status . Code . RESOURCE_NOT_FOUND ; // HTTP 429 - Too many requests case 429 : return Guacamole . Status . Code . CLIENT_TOO_MANY ; // HTTP 503 - Server unavailable case 503 : return Guacamole . Status . Code . SERVER_BUSY ; } // Default all other codes to generic internal error return Guacamole . Status . Code . SERVER_ERROR ; }
Returns the Guacamole protocol status code which most closely
represents the given HTTP status code.

@private
@param {Number} httpStatus
The HTTP status code to translate into a Guacamole protocol status
code.

@returns {Number}
The Guacamole protocol status code which most closely represents the
given HTTP status code.
Returns the Guacamole protocol status code which most closely represents the given HTTP status code .