fix: v2 sentry errors (#20902)
Post release / release (push) Canceled after 0s

* refactor: no_available_users_found_error for team event

* fix: hosts_unavailable_for_booking

* fix: Cannot read properties of undefined (reading 'replace')

* fix: Cannot read properties of undefined (reading 'phoneNumber')

* fix: No SelectedCalendar found.

* fix: Cannot read properties of undefined (reading 'length')

* refactor: add bookings errors service
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-04-24 16:06:37 +03:00
1 parent 49a2c60212
commit 4cc1bc6746
20 files changed
+216 -67

No files matched your search

@@ -2,7 +2,7 @@ import { useQuery, useMutation } from "@tanstack/react-query";
import type { CALENDARS } from "@calcom/platform-constants";
import { SUCCESS_STATUS, ERROR_STATUS } from "@calcom/platform-constants";
import type { ApiResponse, ApiErrorResponse } from "@calcom/platform-types";
import type { ApiResponse, ApiErrorResponse, CreateCalendarCredentialsInput } from "@calcom/platform-types";
import http from "../../lib/http";
@@ -67,11 +67,11 @@ export const useSaveCalendarCredentials = (
const mutation = useMutation<
ApiResponse<{ status: string }>,
unknown,
{ username: string; password: string; calendar: (typeof CALENDARS)[number] }
CreateCalendarCredentialsInput & { calendar: (typeof CALENDARS)[number] }
>({
mutationFn: (data) => {
const { calendar, username, password } = data;
const body = {
const body: CreateCalendarCredentialsInput = {
username,
password,
};
@@ -17,6 +17,7 @@ import {
Min,
registerDecorator,
Validate,
IsDefined,
} from "class-validator";
import { isValidPhoneNumber } from "libphonenumber-js";
@@ -169,6 +170,7 @@ export class CreateBookingInput_2024_08_13 {
type: Attendee,
description: "The attendee's details.",
})
@IsDefined()
@ValidateNested()
@Type(() => Attendee)
attendee!: Attendee;
@@ -0,0 +1 @@
export * from "./inputs";
@@ -0,0 +1,14 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsString, MinLength } from "class-validator";
export class CreateCalendarCredentialsInput {
@IsString()
@MinLength(1)
@ApiProperty()
username!: string;
@IsString()
@MinLength(1)
@ApiProperty()
password!: string;
}
@@ -0,0 +1,2 @@
export * from "./create-calendar-credentials.input";
export * from "./busy-times.input";