Commit f3deb38d authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Contempla respuestas vacías en control de errores

parent ed6715da
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -155,6 +155,9 @@ define([
				data = handledError.data,
				status = handledError.status;

			this._emitTargetLoadingState('TARGET_LOADED', target/*, requesterId, 'request'*/);

			if (data) {
				// TODO creo que estos valores por defecto deberían ponerse donde se escuchan, no aquí
				if (!data.code) {
					data.code = this.defaultErrorCode;
@@ -162,13 +165,12 @@ define([
				if (!data.description) {
					data.description = this.defaultErrorDescription/* + ' ' + (data.code || '')*/;
				}

			this._emitTargetLoadingState('TARGET_LOADED', target/*, requesterId, 'request'*/);
			}

			this._emitEvt('COMMUNICATION', {
				type: 'alert',
				level: 'error',
				description: data.description
				description: data ? data.description : this.defaultErrorDescription
			});

			var responseObj = {