bundles/org.eclipse.orion.client.cf/web/cfui/cfUtil.js
function(error, target){
			error.Severity = "Error"; //$NON-NLS-0$

			if (error.Message && error.Message.indexOf("The host is taken") === 0) //$NON-NLS-0$
				error.Message = messages["theHostIsAlreadyIn"];

			if (error.HttpCode === 404){

				error = {
					State: "NOT_DEPLOYED", //$NON-NLS-0$
					Message: error.Message,
					Severity: "Error" //$NON-NLS-0$
				};

			} else if (error.JsonData && error.JsonData.error_code) {
				var err = error.JsonData;
				if (err.error_code === "CF-InvalidAuthToken" || err.error_code === "CF-NotAuthenticated"){ //$NON-NLS-0$ //$NON-NLS-1$

					error.Retry = {
						parameters: [{
							id: "user", //$NON-NLS-0$
							type: "text", //$NON-NLS-0$
							name: messages["iD:"]
						}, {
							id: "password", //$NON-NLS-0$
							type: "password", //$NON-NLS-0$
							name: messages["password:"]
						}, {
							id: "url", //$NON-NLS-0$
							hidden: true,
							value: target.Url
						}]
					};

					error.forceShowMessage = true;
					error.Severity = "Info"; //$NON-NLS-0$
					error.Message = this.getLoginMessage(target.ManageUrl);

				} else if (err.error_code === "CF-TargetNotSet"){ //$NON-NLS-0$
					var cloudSettingsPageUrl = new URITemplate("{+OrionHome}/settings/settings.html#,category=cloud").expand({OrionHome : PageLinks.getOrionHome()}); //$NON-NLS-0$
					error.Message = i18Util.formatMessage(messages["setUpYourCloud.Go"], cloudSettingsPageUrl);

				} else if (err.error_code === "ServiceNotFound"){
					if(target.ManageUrl){
						var redirectToDashboard = target.ManageUrl;
						var serviceName = err.metadata.service;
						error.Message = i18Util.formatMessage(messages["service${0}NotFoundsetUpYourService.Go${1}"], serviceName, redirectToDashboard);
					}
				}
			}

			return error;
		}
function(error, target){
			error.Severity = "Error"; //$NON-NLS-0$

			if (error.Message && error.Message.indexOf("The host is taken") === 0) //$NON-NLS-0$
				error.Message = messages["theHostIsAlreadyIn"];

			if (error.HttpCode === 404){

				error = {
					State: "NOT_DEPLOYED", //$NON-NLS-0$
					Message: error.Message,
					Severity: "Error" //$NON-NLS-0$
				};

			} else if (error.JsonData && error.JsonData.error_code) {
				var err = error.JsonData;
				if (err.error_code === "CF-InvalidAuthToken" || err.error_code === "CF-NotAuthenticated"){ //$NON-NLS-0$ //$NON-NLS-1$

					error.Retry = {
						parameters: [{
							id: "user", //$NON-NLS-0$
							type: "text", //$NON-NLS-0$
							name: messages["iD:"]
						}, {
							id: "password", //$NON-NLS-0$
							type: "password", //$NON-NLS-0$
							name: messages["password:"]
						}, {
							id: "url", //$NON-NLS-0$
							hidden: true,
							value: target.Url
						}]
					};

					error.forceShowMessage = true;
					error.Severity = "Info"; //$NON-NLS-0$
					error.Message = this.getLoginMessage(target.ManageUrl);

				} else if (err.error_code === "CF-TargetNotSet"){ //$NON-NLS-0$
					var cloudSettingsPageUrl = new URITemplate("{+OrionHome}/settings/settings.html#,category=cloud").expand({OrionHome : PageLinks.getOrionHome()}); //$NON-NLS-0$
					error.Message = i18Util.formatMessage(messages["setUpYourCloud.Go"], cloudSettingsPageUrl);

				} else if (err.error_code === "ServiceNotFound"){
					if(target.ManageUrl){
						var redirectToDashboard = target.ManageUrl;
						var serviceName = err.metadata.service;
						error.Message = i18Util.formatMessage(messages["service${0}NotFoundsetUpYourService.Go${1}"], serviceName, redirectToDashboard);
					}
				}
			}

			return error;
		}
function ( error , target ) { error . Severity = "Error" ; //$NON-NLS-0$ if ( error . Message && error . Message . indexOf ( "The host is taken" ) === 0 ) //$NON-NLS-0$ error . Message = messages [ "theHostIsAlreadyIn" ] ; if ( error . HttpCode === 404 ) { error = { State : "NOT_DEPLOYED" , //$NON-NLS-0$ Message : error . Message , Severity : "Error" //$NON-NLS-0$ } ; } else if ( error . JsonData && error . JsonData . error_code ) { var err = error . JsonData ; if ( err . error_code === "CF-InvalidAuthToken" || err . error_code === "CF-NotAuthenticated" ) { //$NON-NLS-0$ //$NON-NLS-1$ error . Retry = { parameters : [ { id : "user" , //$NON-NLS-0$ type : "text" , //$NON-NLS-0$ name : messages [ "iD:" ] } , { id : "password" , //$NON-NLS-0$ type : "password" , //$NON-NLS-0$ name : messages [ "password:" ] } , { id : "url" , //$NON-NLS-0$ hidden : true , value : target . Url } ] } ; error . forceShowMessage = true ; error . Severity = "Info" ; //$NON-NLS-0$ error . Message = this . getLoginMessage ( target . ManageUrl ) ; } else if ( err . error_code === "CF-TargetNotSet" ) { //$NON-NLS-0$ var cloudSettingsPageUrl = new URITemplate ( "{+OrionHome}/settings/settings.html#,category=cloud" ) . expand ( { OrionHome : PageLinks . getOrionHome ( ) } ) ; //$NON-NLS-0$ error . Message = i18Util . formatMessage ( messages [ "setUpYourCloud.Go" ] , cloudSettingsPageUrl ) ; } else if ( err . error_code === "ServiceNotFound" ) { if ( target . ManageUrl ) { var redirectToDashboard = target . ManageUrl ; var serviceName = err . metadata . service ; error . Message = i18Util . formatMessage ( messages [ "service${0}NotFoundsetUpYourService.Go${1}" ] , serviceName , redirectToDashboard ) ; } } } return error ; }
Decorates the given error object.
Decorates the given error object .