@ardimedia/angular-portal-azure 0.2.196 → 0.2.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/apn.d.ts +2 -1
  2. package/apn.js +33 -10
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -420,7 +420,8 @@ declare namespace angularportalazure {
420
420
  StatusText: string | undefined;
421
421
  Url: string;
422
422
  static prepareException(response: angular.IHttpPromiseCallbackArg<angularportalazure.Exception> | any): angularportalazure.Exception;
423
- private static processDotNetException(response);
423
+ private static processDotNetException1(response);
424
+ private static processDotNetException2(response);
424
425
  }
425
426
  }
426
427
  declare namespace angularportalazure {
package/apn.js CHANGED
@@ -1382,15 +1382,33 @@ var angularportalazure;
1382
1382
  Exception.prepareException = function (response) {
1383
1383
  console.log('convertException: input [angular.IHttpPromiseCallbackArg<angularportalazure.Exception>]');
1384
1384
  console.log(response);
1385
- var exception = Exception.processDotNetException(response.data);
1386
- exception.ExceptionType = response.data.ExceptionType;
1387
- exception.Type = response.data.Type;
1388
- exception.Message = response.data.Message;
1389
- exception.MessageDetail = response.data.MessageDetail;
1390
- exception.Messages = response.data.Messages;
1391
- exception.Url = response.config.url;
1392
- exception.Status = response.status;
1393
- exception.StatusText = response.statusText;
1385
+ var exception = new angularportalazure.Exception();
1386
+ if (response.headers === undefined) {
1387
+ exception = Exception.processDotNetException1(response.data);
1388
+ exception.ExceptionMessage = response.data.ExceptionMessage;
1389
+ exception.StackTrace = response.data.StackTrace;
1390
+ exception.ExceptionType = response.data.ExceptionType;
1391
+ exception.Type = response.data.Type;
1392
+ exception.Message = response.data.Message;
1393
+ exception.MessageDetail = response.data.MessageDetail;
1394
+ exception.Messages = response.data.Messages;
1395
+ exception.Url = response.config.url;
1396
+ exception.Status = response.status;
1397
+ exception.StatusText = response.statusText;
1398
+ }
1399
+ else {
1400
+ exception = Exception.processDotNetException2(response.data);
1401
+ exception.ExceptionMessage = response.json().ExceptionMessage;
1402
+ exception.StackTrace = response.json().StackTrace;
1403
+ exception.ExceptionType = response.json().ExceptionType;
1404
+ exception.Type = response.json().Type;
1405
+ exception.Message = response.json().Message;
1406
+ exception.MessageDetail = response.json().MessageDetail;
1407
+ exception.Messages = response.json().Messages;
1408
+ exception.Url = response.url;
1409
+ exception.Status = response.status;
1410
+ exception.StatusText = response.statusText;
1411
+ }
1394
1412
  //// Find a better way to log information, maybe to the database or to Google Analytics.
1395
1413
  //console.log('processException:');
1396
1414
  //console.log(response);
@@ -1399,7 +1417,7 @@ var angularportalazure;
1399
1417
  console.log(exception);
1400
1418
  return exception;
1401
1419
  };
1402
- Exception.processDotNetException = function (response) {
1420
+ Exception.processDotNetException1 = function (response) {
1403
1421
  var exception = new angularportalazure.Exception();
1404
1422
  //#region Process data to Messages
1405
1423
  exception.Messages = [];
@@ -1427,6 +1445,11 @@ var angularportalazure;
1427
1445
  //#endregion
1428
1446
  return exception;
1429
1447
  };
1448
+ Exception.processDotNetException2 = function (response) {
1449
+ var exception = new angularportalazure.Exception();
1450
+ console.log('[angularportalazure.Exception.processDotNetException2] not yet implemented.');
1451
+ return exception;
1452
+ };
1430
1453
  return Exception;
1431
1454
  }(angularportalazure.ValidationsExceptionDotNet));
1432
1455
  angularportalazure.Exception = Exception;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ardimedia/angular-portal-azure",
3
3
  "description": "Angular Portal Azure - GUI Framework.",
4
4
  "author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
5
- "version": "0.2.196",
5
+ "version": "0.2.197",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {