https://retellai.com/?utm_source=discord&utm_medium=seo logo
getting 400 error in cal.om
# ❓・bug-report
k
Hello! im getting this error when the function check_calendar_availability is called "{"error":"Error calling Cal Event Type API: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400\nresponse status: 400\nresponse data: [{\"message\":\"1\",\"error\":\"2\"},\"An error occurred while querying the database.\",{}]"}"
c
same
a
It is strange that sometime the same Funtion runs well and sometime it fails. I have got the same error message while passing this invocation to book_appointment_cal { "time": "2025-03-25T09:00:00+01:00", "name": "Abdoul", "email": "abdoul8@netcourrier.com", "eventTypeId": "2085123" } My event ID and API key are well set. Here is the error message: {"error":"Error calling Cal Event Type API: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400\nresponse status: 400\nresponse data: [{\"message\":\"1\"},\"custom in 'responses': {location}error_required_field\"]"}
c
ERR_BAD_REQUEST means the your call needs json set diferently. You need to check how you set up cal.com and if you did any change in its config recently
a
Thanks Chirag. Indeed I fixed the issue by adding {location} field in my json because in cal.com I have set a location in the invite. Thansk for your support.
k
@chiraggupta1910_87616 any ideas about my error? i would really appreciate your help please
c
Hi @karina_96738 i guess you are also facing ERR_BAD_REQUEST, you will need to check your cal config and which detail you are not sending from retell to them, this error comes due to incorrect/incomplete json sent to cal.com
k
thank you!