@23blocks/angular 6.0.2 → 6.1.1

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 (2) hide show
  1. package/README.md +12 -0
  2. package/package.json +13 -4
package/README.md CHANGED
@@ -123,6 +123,9 @@ provideBlocks23({
123
123
 
124
124
  // Optional: Token storage (default: 'localStorage')
125
125
  storage: 'localStorage', // 'localStorage' | 'sessionStorage' | 'memory'
126
+
127
+ // Optional: Enable debug logging
128
+ debug: !environment.production,
126
129
  })
127
130
  ```
128
131
 
@@ -460,12 +463,18 @@ currentUser$ = this.auth.getCurrentUser().pipe(
460
463
 
461
464
  ### Error Handling
462
465
 
466
+ Every error includes a unique request ID for easy debugging and support:
467
+
463
468
  ```typescript
464
469
  import { isBlockErrorException, ErrorCodes } from '@23blocks/contracts';
465
470
 
466
471
  this.auth.signIn({ email, password }).subscribe({
467
472
  error: (err) => {
468
473
  if (isBlockErrorException(err)) {
474
+ // Request tracing for debugging
475
+ console.log('Request ID:', err.requestId); // "req_m5abc_xyz123"
476
+ console.log('Duration:', err.duration); // 145 (ms)
477
+
469
478
  switch (err.code) {
470
479
  case ErrorCodes.INVALID_CREDENTIALS:
471
480
  this.error = 'Invalid email or password';
@@ -479,6 +488,9 @@ this.auth.signIn({ email, password }).subscribe({
479
488
  default:
480
489
  this.error = err.message;
481
490
  }
491
+
492
+ // Send request ID to support for debugging
493
+ // "Please check request req_m5abc_xyz123"
482
494
  }
483
495
  },
484
496
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@23blocks/angular",
3
- "version": "6.0.2",
3
+ "version": "6.1.1",
4
4
  "description": "Angular bindings for 23blocks SDK - Injectable services with RxJS Observables",
5
5
  "license": "MIT",
6
6
  "author": "23blocks <hello@23blocks.com>",
@@ -15,11 +15,20 @@
15
15
  },
16
16
  "keywords": [
17
17
  "23blocks",
18
- "sdk",
19
18
  "angular",
19
+ "angular-services",
20
+ "angular-sdk",
20
21
  "rxjs",
21
- "observable",
22
- "injectable"
22
+ "rxjs-observables",
23
+ "angular-authentication",
24
+ "angular-http-client",
25
+ "angular-backend",
26
+ "angular-api-client",
27
+ "angular-ecommerce",
28
+ "angular-crm",
29
+ "baas-angular",
30
+ "typescript",
31
+ "injectable-services"
23
32
  ],
24
33
  "type": "module",
25
34
  "main": "./dist/index.esm.js",