@ductape/sdk 0.2.6 → 0.2.7

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.
@@ -384,9 +384,9 @@ export default class ProcessorService implements IProcessorService {
384
384
  runBrokerPublish(data: IStepEvent, additional_logs?: Partial<ILogData>): Promise<{
385
385
  published: boolean;
386
386
  }>;
387
- processStorageRequest(data: IStepEvent, input: IStorageRequest, storageEnv: IProductStorageEnvs, additional_logs: Partial<ILogData>, decryptionKey?: string): Promise<{
387
+ processStorageRequest(data: IStepEvent, input: IStorageRequest, storageEnv: IProductStorageEnvs, additional_logs: Partial<ILogData>, decryptionKey?: string): Promise<IProcessingFailure | {
388
388
  url: string;
389
- } | IProcessingFailure>;
389
+ }>;
390
390
  writeResult(status: LogEventStatus, retryable?: boolean): Promise<void>;
391
391
  /**
392
392
  * Separate credentials into prefixed (e.g., 'headers:Authorization') and non-prefixed (e.g., 'api_key').
@@ -3082,7 +3082,8 @@ class ProcessorService {
3082
3082
  this.logService.add(Object.assign(Object.assign(Object.assign({}, this.baseLogs), additional_logs), { successful_execution: true, message: 'Process event - success', data: {}, status: types_1.LogEventStatus.SUCCESS }));
3083
3083
  void this.logService.publish().catch(() => { });
3084
3084
  this.end = Date.now();
3085
- await this.writeResult(types_1.LogEventStatus.SUCCESS);
3085
+ // Invocation persistence is telemetry and must not extend provider latency.
3086
+ void this.writeResult(types_1.LogEventStatus.SUCCESS).catch(() => { });
3086
3087
  }
3087
3088
  }
3088
3089
  checkIsSuccessful() {
@@ -5031,7 +5032,8 @@ class ProcessorService {
5031
5032
  }
5032
5033
  this.end = Date.now();
5033
5034
  this.logService.add(Object.assign(Object.assign(Object.assign({}, this.baseLogs), additional_logs), { message: 'Execute action - success', data: { input, result }, status: types_1.LogEventStatus.SUCCESS }));
5034
- await this.writeResult(types_1.LogEventStatus.SUCCESS);
5035
+ // Invocation persistence is telemetry and must not extend provider latency.
5036
+ void this.writeResult(types_1.LogEventStatus.SUCCESS).catch(() => { });
5035
5037
  // The action result is authoritative; telemetry delivery must not add the
5036
5038
  // Logs API timeout to caller latency.
5037
5039
  void this.logService.publish().catch(() => { });
@@ -5042,7 +5044,8 @@ class ProcessorService {
5042
5044
  this.logService.add(Object.assign(Object.assign(Object.assign({}, this.baseLogs), additional_logs), { message: 'Execute action - failed', data: { e: e.toString() }, status: types_1.LogEventStatus.FAIL }));
5043
5045
  this.end = Date.now();
5044
5046
  if (!(e === null || e === void 0 ? void 0 : e.processorFailureRecorded)) {
5045
- await this.writeResult(types_1.LogEventStatus.FAIL);
5047
+ // Preserve the caller-visible provider/input failure immediately; analytics are eventual.
5048
+ void this.writeResult(types_1.LogEventStatus.FAIL).catch(() => { });
5046
5049
  }
5047
5050
  // Preserve and return the provider error immediately. LogsService keeps
5048
5051
  // unsent entries queued when delivery fails.