Skip to content

Commit

Permalink
chore: improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Jun 27, 2024
1 parent 90a3e1f commit 923ea83
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/resource-rental/resource-rental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 923ea83

Please sign in to comment.