(function(Crowd) {
    function extractErrorMessage(responseText) {
        try {
            var response = JSON.parse(responseText);
            if (response.message) {
                return response.message;
            } else {
                return "";
            }
        } catch (e) {
            return responseText;
        }
    }
    Crowd.extractErrorMessage = extractErrorMessage;
})(window.Crowd = window.Crowd || {});
