@ductape/sdk 0.1.159 → 0.2.0

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.
@@ -5010,6 +5010,14 @@ class ProcessorService {
5010
5010
  recipient_workspace_id: bootstrapData.recipient_workspace_id,
5011
5011
  product_env_mapping: bootstrapData.product_env_mapping,
5012
5012
  });
5013
+ const processorFailure = (0, processor_utils_1.findProcessorFailureResult)(result);
5014
+ if (processorFailure) {
5015
+ throw Object.assign(new Error((0, processor_utils_1.processorFailureMessage)(processorFailure)), {
5016
+ code: processorFailure.error_code,
5017
+ processorFailure,
5018
+ processorFailureRecorded: this.published,
5019
+ });
5020
+ }
5013
5021
  this.end = Date.now();
5014
5022
  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 }));
5015
5023
  await this.writeResult(types_1.LogEventStatus.SUCCESS);
@@ -5020,7 +5028,9 @@ class ProcessorService {
5020
5028
  if (this.logService) {
5021
5029
  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 }));
5022
5030
  this.end = Date.now();
5023
- await this.writeResult(types_1.LogEventStatus.FAIL);
5031
+ if (!(e === null || e === void 0 ? void 0 : e.processorFailureRecorded)) {
5032
+ await this.writeResult(types_1.LogEventStatus.FAIL);
5033
+ }
5024
5034
  await this.logService.publish();
5025
5035
  }
5026
5036
  throw e;