@slavmak2486/bx24ts 1.1.25 → 1.1.26

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.
package/base/BX24.ts CHANGED
@@ -494,16 +494,11 @@ export abstract class baseBX24{
494
494
  return cb(res);
495
495
  })
496
496
  .catch(err=>{
497
- if (err instanceof Error){
498
- throw err;
499
- }
500
- else{
501
- cb(new CallResult(err, {
502
- data:params,
503
- method,
504
- callback:cb
505
- }, this, 500));
506
- }
497
+ cb(new CallResult({error_description:String(err)}, {
498
+ data:params,
499
+ method,
500
+ callback:cb
501
+ },this, 500));
507
502
  })
508
503
  }
509
504
  }
package/dist/base/BX24.js CHANGED
@@ -421,16 +421,11 @@ class baseBX24 {
421
421
  return cb(res);
422
422
  })
423
423
  .catch(err => {
424
- if (err instanceof Error) {
425
- throw err;
426
- }
427
- else {
428
- cb(new callResult_1.CallResult(err, {
429
- data: params,
430
- method,
431
- callback: cb
432
- }, this, 500));
433
- }
424
+ cb(new callResult_1.CallResult({ error_description: String(err) }, {
425
+ data: params,
426
+ method,
427
+ callback: cb
428
+ }, this, 500));
434
429
  });
435
430
  }
436
431
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slavmak2486/bx24ts",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "Library for bitrix24",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",