chore: improve logs (#12467)
* chore: improve logs * fix: import * chore: use safe stringify * chore: add more logs to google calendar * chore: use this.log --------- Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
1 parent
6c4b1154b8
commit
7dc6df2ad6
10 files changed
+53
-20
No files matched your search
@@ -14,6 +14,7 @@ import { HttpError as HttpCode } from "@calcom/lib/http-error";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { getBooking } from "@calcom/lib/payment/getBooking";
|
||||
import { handlePaymentSuccess } from "@calcom/lib/payment/handlePaymentSuccess";
|
||||
import { safeStringify } from "@calcom/lib/safeStringify";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { BookingStatus } from "@calcom/prisma/enums";
|
||||
|
||||
@@ -38,7 +39,7 @@ export async function handleStripePaymentSuccess(event: Stripe.Event) {
|
||||
});
|
||||
|
||||
if (!payment?.bookingId) {
|
||||
log.error(JSON.stringify(paymentIntent), JSON.stringify(payment));
|
||||
log.error("Stripe: Payment Not Found", safeStringify(paymentIntent), safeStringify(payment));
|
||||
throw new HttpCode({ statusCode: 204, message: "Payment not found" });
|
||||
}
|
||||
if (!payment?.bookingId) throw new HttpCode({ statusCode: 204, message: "Payment not found" });
|
||||
|
||||
Reference in new issue
Block a user