Sha256: 2d454c29fc631a6982dd771c092465742dfb218a9d74cf1cc33ecb0052c03c7b
Contents?: true
Size: 1.39 KB
Versions: 8
Compression:
Stored size: 1.39 KB
Contents
/*global define*/ define(['Core/defined'], function(defined) { "use strict"; /** * An event that is raised when a request encounters an error. * * @constructor * @alias RequestErrorEvent * * @param {Number} [statusCode] The HTTP error status code, such as 404. * @param {Object} [response] The response included along with the error. */ var RequestErrorEvent = function RequestErrorEvent(statusCode, response) { /** * The HTTP error status code, such as 404. If the error does not have a particular * HTTP code, this property will be undefined. * * @type {Number} */ this.statusCode = statusCode; /** * The response included along with the error. If the error does not include a response, * this property will be undefined. * * @type {Object} */ this.response = response; }; /** * Creates a string representing this RequestErrorEvent. * @memberof RequestErrorEvent * * @returns {String} A string representing the provided RequestErrorEvent. */ RequestErrorEvent.prototype.toString = function() { var str = 'Request has failed.'; if (defined(this.statusCode)) { str += ' Status Code: ' + this.statusCode; } return str; }; return RequestErrorEvent; });
Version data entries
8 entries across 8 versions & 1 rubygems