feat: distributed tracing - 3 (#25092)
* feat: distributed tracing 2 * feat: distributed tracing 2 * refactor: feedback * refactor: feedback * fix: type error * fix: trpc error * feat: distributed tracing - 3 * chore: translation * refactor: improvements * fix: feedback * chore: remove
This commit is contained in:
1 parent
741144bff2
commit
843329ccce
7 files changed
+210
-24
No files matched your search
@@ -323,6 +323,12 @@ const getError = ({
|
||||
return error?.message ? (
|
||||
<>
|
||||
{responseVercelIdHeader ?? ""} {t(messageKey, { date, count })}
|
||||
{error.data?.traceId && (
|
||||
<div className="text-subtle mt-2 text-xs">
|
||||
<span className="font-medium">{t("trace_reference_id")}:</span>
|
||||
<code className="ml-1 select-all break-all font-mono">{error.data.traceId}</code>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>{t("can_you_try_again")}</>
|
||||
|
||||
@@ -400,6 +400,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
|
||||
|
||||
const error = err as Error & {
|
||||
data: { rescheduleUid: string; startTime: string; attendees: string[] };
|
||||
traceId?: string;
|
||||
};
|
||||
|
||||
if (error.message === ErrorCode.BookerLimitExceededReschedule && error.data?.rescheduleUid) {
|
||||
@@ -521,6 +522,11 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, isBookin
|
||||
: event?.data?.forwardParamsSuccessRedirect,
|
||||
});
|
||||
},
|
||||
onError: (err, _, ctx) => {
|
||||
console.error("Error creating recurring booking", err);
|
||||
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- It is only called when user takes an action in embed
|
||||
bookerFormErrorRef && bookerFormErrorRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
},
|
||||
});
|
||||
|
||||
const handleBookEvent = useHandleBookEvent({
|
||||
|
||||
@@ -580,7 +580,6 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 400,
|
||||
message: "email_verification_required",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -590,7 +589,6 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 400,
|
||||
message: "invalid_verification_code",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -608,14 +606,12 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 404,
|
||||
message: "event_type_not_found",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
|
||||
if (eventType.seatsPerTimeSlot && eventType.recurringEvent) {
|
||||
throw new HttpError({
|
||||
statusCode: 400,
|
||||
message: "recurring_event_seats_error",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -757,7 +753,6 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 400,
|
||||
message: "Missing routingFormResponseId",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
routingFormResponse = await deps.prismaClient.app_RoutingForms_FormResponse.findUnique({
|
||||
@@ -1858,7 +1853,6 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 409,
|
||||
message: ErrorCode.BookingConflict,
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
throw err;
|
||||
@@ -2105,7 +2099,6 @@ async function handler(
|
||||
const error = {
|
||||
errorCode: "BookingCreatingMeetingFailed",
|
||||
message: "Booking failed",
|
||||
data: { traceId: traceContext.traceId },
|
||||
};
|
||||
|
||||
tracingLogger.error(
|
||||
@@ -2329,7 +2322,6 @@ async function handler(
|
||||
throw new HttpError({
|
||||
statusCode: 400,
|
||||
message: "Missing payment credentials",
|
||||
data: { traceId: traceContext.traceId },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user