fix(medusa): Batch job not saving the errors properly (#2812)
This commit is contained in:
committed by
GitHub
parent
c16522d6ce
commit
5e4decbc1c
@@ -69,6 +69,7 @@ export abstract class AbstractBatchJobStrategy
|
||||
err: unknown,
|
||||
result: T
|
||||
): Promise<void> {
|
||||
// TODO just throw to be handled by the subscriber
|
||||
return await this.atomicPhase_(async (transactionManager) => {
|
||||
const batchJob = (await this.batchJobService_
|
||||
.withTransaction(transactionManager)
|
||||
@@ -95,7 +96,7 @@ export abstract class AbstractBatchJobStrategy
|
||||
},
|
||||
result: {
|
||||
...result,
|
||||
errors: [...existingErrors, resultError],
|
||||
errors: [...existingErrors, resultError.message],
|
||||
},
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user