@switchlabs/verify-ai-react-native 2.4.17 → 2.4.18

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.
@@ -121,10 +121,21 @@ export class VerifyAIClient {
121
121
  const telemetryError = eventType === 'request_timeout'
122
122
  ? `${normalized.message} [${context.method} ${context.path}; timeout=${this.timeout}ms]`
123
123
  : normalized;
124
+ const metadata = {
125
+ method: context.method,
126
+ path: context.path,
127
+ status: normalized.status,
128
+ timeout_ms: this.timeout,
129
+ };
130
+ if (normalized.code)
131
+ metadata.code = normalized.code;
132
+ if (normalized.requestId)
133
+ metadata.request_id = normalized.requestId;
124
134
  this.telemetry.track(eventType, {
125
135
  component: 'client',
126
136
  error: telemetryError,
127
137
  errorCode,
138
+ metadata,
128
139
  });
129
140
  }
130
141
  throw normalized;
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.4.17";
1
+ export declare const SDK_VERSION = "2.4.18";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = '2.4.17';
1
+ export const SDK_VERSION = '2.4.18';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@switchlabs/verify-ai-react-native",
3
- "version": "2.4.17",
3
+ "version": "2.4.18",
4
4
  "description": "React Native SDK for Verify AI - photo verification with AI vision processing",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -178,12 +178,21 @@ export class VerifyAIClient {
178
178
  const telemetryError = eventType === 'request_timeout'
179
179
  ? `${normalized.message} [${context.method} ${context.path}; timeout=${this.timeout}ms]`
180
180
  : normalized;
181
+ const metadata: Record<string, string | number> = {
182
+ method: context.method,
183
+ path: context.path,
184
+ status: normalized.status,
185
+ timeout_ms: this.timeout,
186
+ };
187
+ if (normalized.code) metadata.code = normalized.code;
188
+ if (normalized.requestId) metadata.request_id = normalized.requestId;
181
189
  this.telemetry.track(
182
190
  eventType,
183
191
  {
184
192
  component: 'client',
185
193
  error: telemetryError,
186
194
  errorCode,
195
+ metadata,
187
196
  },
188
197
  );
189
198
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = '2.4.17';
1
+ export const SDK_VERSION = '2.4.18';