@goweekdays/core 1.1.1 → 1.1.2
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.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -24960,6 +24960,7 @@ function useInvoiceService() {
|
|
|
24960
24960
|
});
|
|
24961
24961
|
return;
|
|
24962
24962
|
}
|
|
24963
|
+
session.startTransaction();
|
|
24963
24964
|
try {
|
|
24964
24965
|
const invoice = await getByTransactionId(invoiceId);
|
|
24965
24966
|
if (!invoice) {
|
|
@@ -24970,7 +24971,6 @@ function useInvoiceService() {
|
|
|
24970
24971
|
"Subscription ID is missing in invoice metadata."
|
|
24971
24972
|
);
|
|
24972
24973
|
}
|
|
24973
|
-
session?.startTransaction();
|
|
24974
24974
|
const subscription = await getById(invoice.metadata.subscriptionId);
|
|
24975
24975
|
if (!subscription) {
|
|
24976
24976
|
throw new import_utils84.NotFoundError("Subscription not found.");
|
|
@@ -25022,13 +25022,14 @@ function useInvoiceService() {
|
|
|
25022
25022
|
await session.commitTransaction();
|
|
25023
25023
|
return "Payment processed successfully.";
|
|
25024
25024
|
} catch (error) {
|
|
25025
|
-
session
|
|
25025
|
+
session.abortTransaction();
|
|
25026
25026
|
import_utils84.logger.log({
|
|
25027
25027
|
level: "error",
|
|
25028
25028
|
message: String(error)
|
|
25029
25029
|
});
|
|
25030
|
+
throw error;
|
|
25030
25031
|
} finally {
|
|
25031
|
-
session
|
|
25032
|
+
session.endSession();
|
|
25032
25033
|
}
|
|
25033
25034
|
}
|
|
25034
25035
|
return {
|