function (jqXHR, sMessage, sRequestUrl, sResourcePath) {
			var sBody = jqXHR.responseText,
				sContentType = jqXHR.getResponseHeader("Content-Type"),
				oResult = new Error(sMessage + ": " + jqXHR.status + " " + jqXHR.statusText);

			oResult.status = jqXHR.status;
			oResult.statusText = jqXHR.statusText;
			oResult.requestUrl = sRequestUrl;
			oResult.resourcePath = sResourcePath;
			if (jqXHR.status === 0) {
				oResult.message = "Network error";
				return oResult;
			}
			if (sContentType) {
				sContentType = sContentType.split(";")[0];
			}
			if (jqXHR.status === 412) {
				oResult.isConcurrentModification = true;
			}
			if (sContentType === "application/json") {
				try {
					// "The error response MUST be a single JSON object. This object MUST have a
					// single name/value pair named error. The value must be a JSON object."
					oResult.error = JSON.parse(sBody).error;
					oResult.message = oResult.error.message;
					if (typeof oResult.message === "object") {
						// oResult.message is in OData V2 an object containing the human readable
						// error message in the property value
						oResult.message = oResult.error.message.value;
					}
				} catch (e) {
					Log.warning(e.toString(), sBody, sClassName);
				}
			} else if (sContentType === "text/plain") {
				oResult.message = sBody;
			}

			return oResult;
		}
function (jqXHR, sMessage, sRequestUrl, sResourcePath) {
			var sBody = jqXHR.responseText,
				sContentType = jqXHR.getResponseHeader("Content-Type"),
				oResult = new Error(sMessage + ": " + jqXHR.status + " " + jqXHR.statusText);

			oResult.status = jqXHR.status;
			oResult.statusText = jqXHR.statusText;
			oResult.requestUrl = sRequestUrl;
			oResult.resourcePath = sResourcePath;
			if (jqXHR.status === 0) {
				oResult.message = "Network error";
				return oResult;
			}
			if (sContentType) {
				sContentType = sContentType.split(";")[0];
			}
			if (jqXHR.status === 412) {
				oResult.isConcurrentModification = true;
			}
			if (sContentType === "application/json") {
				try {
					// "The error response MUST be a single JSON object. This object MUST have a
					// single name/value pair named error. The value must be a JSON object."
					oResult.error = JSON.parse(sBody).error;
					oResult.message = oResult.error.message;
					if (typeof oResult.message === "object") {
						// oResult.message is in OData V2 an object containing the human readable
						// error message in the property value
						oResult.message = oResult.error.message.value;
					}
				} catch (e) {
					Log.warning(e.toString(), sBody, sClassName);
				}
			} else if (sContentType === "text/plain") {
				oResult.message = sBody;
			}

			return oResult;
		}
function ( jqXHR , sMessage , sRequestUrl , sResourcePath ) { var sBody = jqXHR . responseText , sContentType = jqXHR . getResponseHeader ( "Content-Type" ) , oResult = new Error ( sMessage + ": " + jqXHR . status + " " + jqXHR . statusText ) ; oResult . status = jqXHR . status ; oResult . statusText = jqXHR . statusText ; oResult . requestUrl = sRequestUrl ; oResult . resourcePath = sResourcePath ; if ( jqXHR . status === 0 ) { oResult . message = "Network error" ; return oResult ; } if ( sContentType ) { sContentType = sContentType . split ( ";" ) [ 0 ] ; } if ( jqXHR . status === 412 ) { oResult . isConcurrentModification = true ; } if ( sContentType === "application/json" ) { try { // "The error response MUST be a single JSON object. This object MUST have a // single name/value pair named error. The value must be a JSON object." oResult . error = JSON . parse ( sBody ) . error ; oResult . message = oResult . error . message ; if ( typeof oResult . message === "object" ) { // oResult.message is in OData V2 an object containing the human readable // error message in the property value oResult . message = oResult . error . message . value ; } } catch ( e ) { Log . warning ( e . toString ( ) , sBody , sClassName ) ; } } else if ( sContentType === "text/plain" ) { oResult . message = sBody ; } return oResult ; }
Returns an <code>Error</code> instance from a jQuery XHR wrapper.

@param {object} jqXHR
A jQuery XHR wrapper as received by a failure handler
@param {function} jqXHR.getResponseHeader
Used to access the HTTP response header "Content-Type"
@param {string} jqXHR.responseText
HTTP response body, sometimes in JSON format ("Content-Type" : "application/json")
according to OData "19 Error Response" specification, sometimes plain text
("Content-Type" : "text/plain"); other formats are ignored
@param {number} jqXHR.status
HTTP status code
@param {string} jqXHR.statusText
HTTP status text
@param {string} sMessage
The message for the <code>Error</code> instance; code and status text of the HTTP error
are appended
@param {string} [sRequestUrl]
The request URL
@param {string} [sResourcePath]
The path by which this resource has originally been requested
@returns {Error}
An <code>Error</code> instance with the following properties:
<ul>
<li><code>error</code>: The "error" value from the OData V4 error response JSON
object (if available)
<li><code>isConcurrentModification</code>: <code>true</code> In case of a
concurrent modification detected via ETags (i.e. HTTP status code 412)
<li><code>message</code>: Error message
<li><code>requestUrl</code>: The request URL
<li><code>resourcePath</code>: The path by which this resource has originally been
requested
<li><code>status</code>: HTTP status code
<li><code>statusText</code>: (optional) HTTP status text
</ul>
@see <a href=
"http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html"
>"19 Error Response"</a>
Returns an <code > Error< / code > instance from a jQuery XHR wrapper .
This function is called when an error is received from the server.