@cadenza.io/service 2.17.34 → 2.17.35

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/dist/index.d.mts CHANGED
@@ -22926,6 +22926,7 @@ declare class RestController {
22926
22926
  private resolveTransportDiagnosticsOptions;
22927
22927
  private ensureFetchClientDiagnostics;
22928
22928
  private getErrorMessage;
22929
+ private resolveDelegationTimeoutMs;
22929
22930
  private recordFetchClientError;
22930
22931
  private collectFetchTransportDiagnostics;
22931
22932
  /**
package/dist/index.d.ts CHANGED
@@ -22926,6 +22926,7 @@ declare class RestController {
22926
22926
  private resolveTransportDiagnosticsOptions;
22927
22927
  private ensureFetchClientDiagnostics;
22928
22928
  private getErrorMessage;
22929
+ private resolveDelegationTimeoutMs;
22929
22930
  private recordFetchClientError;
22930
22931
  private collectFetchTransportDiagnostics;
22931
22932
  /**
package/dist/index.js CHANGED
@@ -4186,7 +4186,7 @@ var RestController = class _RestController {
4186
4186
  method: "POST",
4187
4187
  body: JSON.stringify(delegateCtx)
4188
4188
  },
4189
- 3e4
4189
+ this.resolveDelegationTimeoutMs(delegateCtx)
4190
4190
  );
4191
4191
  if (resultContext?.errored || resultContext?.failed) {
4192
4192
  fetchDiagnostics.delegationFailures++;
@@ -4440,6 +4440,12 @@ var RestController = class _RestController {
4440
4440
  return String(error);
4441
4441
  }
4442
4442
  }
4443
+ resolveDelegationTimeoutMs(ctx) {
4444
+ const syncing = ctx?.__syncing === true || ctx?.__metadata?.__syncing === true || Array.isArray(ctx?.joinedContexts) && ctx.joinedContexts.some(
4445
+ (joinedCtx) => joinedCtx?.__syncing === true || joinedCtx?.__metadata?.__syncing === true
4446
+ );
4447
+ return syncing ? 12e4 : 3e4;
4448
+ }
4443
4449
  recordFetchClientError(fetchId, serviceName, url, error) {
4444
4450
  const state = this.ensureFetchClientDiagnostics(fetchId, serviceName, url);
4445
4451
  const message = this.getErrorMessage(error);