{"record":{"id":"a43942c071d4a955","repo":"calcom/cal.diy","slug":"event-type-with-id-inputbooking-eventtypeid-is","errorCode":null,"errorMessage":"Event type with id=${inputBooking.eventTypeId} is not a recurring event","messagePattern":"Event type with id=(.+?) is not a recurring event","errorType":"http","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts","lineNumber":428,"sourceCode":"          } not valid for event type with id=${\n            dbEventType.id\n          }. The event type has following integrations: ${allowedIntegrations.join(\n            \", \"\n          )}, and only these integrations are allowed for booking location.`\n        );\n      }\n    }\n\n    return true;\n  }\n\n  async transformInputCreateRecurringBooking(\n    inputBooking: CreateRecurringBookingInput_2024_08_13,\n    eventType: EventTypeWithOwnerAndTeam,\n    platformClientId?: string\n  ) {\n    if (!eventType.recurringEvent) {\n      throw new NotFoundException(`Event type with id=${inputBooking.eventTypeId} is not a recurring event`);\n    }\n\n    this.validateBookingLengthInMinutes(inputBooking, eventType);\n    const lengthInMinutes = inputBooking.lengthInMinutes ?? eventType.length;\n\n    const occurrence = recurringEventSchema.parse(eventType.recurringEvent);\n    const repeatsEvery = occurrence.interval;\n\n    if (inputBooking.recurrenceCount && inputBooking.recurrenceCount > occurrence.count) {\n      throw new BadRequestException(\n        \"Provided recurrence count is higher than the event type's recurring event count.\"\n      );\n    }\n    const repeatsTimes = inputBooking.recurrenceCount || occurrence.count;\n    // note(Lauris): timeBetween 0=yearly, 1=monthly and 2=weekly\n    const timeBetween = occurrence.freq;\n\n    const events = [];","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts#L410-L446","documentation":"Thrown by transformInputCreateRecurringBooking when eventType.recurringEvent is falsy. NotFoundException (HTTP 404). A recurring booking can only be created against an event type that has a recurringEvent configuration; without one the recurring endpoint has no interval/count/freq to expand into multiple occurrences.","triggerScenarios":"POST /v2/bookings/recurring with the eventTypeId of a plain (non-recurring) event type. The service checks eventType.recurringEvent and, finding none, throws. The caller should have used the plain POST /v2/bookings endpoint instead.","commonSituations":"Wrong endpoint used (recurring vs single); event type's recurring config was removed after the client cached its id; client defaulting to the recurring endpoint for all bookings; recurringEvent field null because the event type was cloned without recurring settings.","solutions":["Use POST /v2/bookings (single) instead of POST /v2/bookings/recurring for non-recurring event types.","Verify eventType.recurringEvent is set via GET /v2/event-types/{id} before calling the recurring endpoint.","Configure recurring settings on the event type in the dashboard if recurring bookings are required.","Branch client-side: call recurring only when the fetched event type has recurringEvent."],"exampleFix":"// before\nawait api.post('/v2/bookings/recurring', { eventTypeId: 123, start, ... });\n\n// after\nconst et = await api.get('/v2/event-types/123');\nconst url = et.data.recurringEvent ? '/v2/bookings/recurring' : '/v2/bookings';\nawait api.post(url, { eventTypeId: 123, start, ... });","handlingStrategy":"validation","validationCode":"const et = await api.get(`/v2/event-types/${eventTypeId}`);\nif (!et.data.recurringEvent) throw new Error('use the single-booking endpoint for non-recurring event types');\nconst url = et.data.recurringEvent ? '/v2/bookings/recurring' : '/v2/bookings';","typeGuard":"const isRecurringEventType = (et: { recurringEvent?: unknown }): boolean =>\n  Boolean(et.recurringEvent);","tryCatchPattern":"try { await api.post('/v2/bookings/recurring', body); }\ncatch (e) {\n  if (e.response?.status === 404 && /not a recurring event/.test(e.response.data.message)) {\n    await api.post('/v2/bookings', body); // fall back to single booking\n  } else throw e;\n}","preventionTips":["Branch the endpoint on whether the fetched event type has recurringEvent.","Configure recurring settings on the event type before using the recurring endpoint.","Do not default to the recurring endpoint for all bookings."],"tags":["api","bookings","recurring","event-types","not-found","nestjs"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}