nucleus-core-ts 0.9.970 → 0.9.971

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.
@@ -2364,7 +2364,12 @@ export interface EndpointState<TSuccess, TError> {
2364
2364
  export interface StartOptions<TPayload, TSuccess, TError> {
2365
2365
  payload: TPayload | FormData;
2366
2366
  onAfterHandle?: (data: TSuccess) => void;
2367
- onErrorHandle?: (error: TError, code?: number | null) => void;
2367
+ /**
2368
+ * `requestId` is the server's id for the failed request. Show it: on a 5xx the
2369
+ * message is deliberately generic, and this is the only thing that leads from
2370
+ * what the person saw to the log line that says why.
2371
+ */
2372
+ onErrorHandle?: (error: TError, code?: number | null, requestId?: string) => void;
2368
2373
  }
2369
2374
  export interface EndpointAction<TPayload, TSuccess, TError> {
2370
2375
  state: EndpointState<TSuccess, TError>;
@@ -2373,7 +2378,12 @@ export interface EndpointAction<TPayload, TSuccess, TError> {
2373
2378
  (options: {
2374
2379
  payload: FormData;
2375
2380
  onAfterHandle?: (data: TSuccess) => void;
2376
- onErrorHandle?: (error: TError, code?: number | null) => void;
2381
+ /**
2382
+ * `requestId` is the server's id for the failed request. Show it: on a 5xx the
2383
+ * message is deliberately generic, and this is the only thing that leads from
2384
+ * what the person saw to the log line that says why.
2385
+ */
2386
+ onErrorHandle?: (error: TError, code?: number | null, requestId?: string) => void;
2377
2387
  }): void;
2378
2388
  };
2379
2389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nucleus-core-ts",
3
- "version": "0.9.970",
3
+ "version": "0.9.971",
4
4
  "description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
5
5
  "author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",