diff --git a/src/resource-rental/resource-rental.ts b/src/resource-rental/resource-rental.ts index 6f63a3862..54d11b6b6 100644 --- a/src/resource-rental/resource-rental.ts +++ b/src/resource-rental/resource-rental.ts @@ -162,9 +162,14 @@ export class ResourceRental { ...this.resourceRentalOptions?.exeUnit, }); return this.currentExeUnit; - })().finally(() => { - this.exeUnitPromise = undefined; - }); + })() + .catch((error) => { + this.logger.error(`Failed to create exe-unit. ${error}`, { agreementId: this.agreement.id }); + throw error; + }) + .finally(() => { + this.exeUnitPromise = undefined; + }); } return this.exeUnitPromise; }