fix: fix busy-times 400 errors, surface full API error bodies, and fix booking location schema#75
Merged
sahitya-chandra merged 1 commit intomainfrom Apr 7, 2026
Conversation
…x booking location schema - calendars.ts: use nested bracket-notation query params (calendarsToLoad[0][credentialId], etc.) as required by the Cal.com v2 busy-times controller, instead of flat credentialId/externalId - api-client.ts: decode %5B/%5D back to literal brackets in URLs so NestJS parses nested params - api-client.ts: extract error messages from both body.message and body.error fields - tool-helpers.ts: include full API response body in error messages so MCP clients can debug 400s - bookings.ts: change location schema from string|object to object-only per OpenAPI spec, with description listing all 8 valid location types - register-tools.ts: improve get_busy_times tool description with clearer workflow and date format - Updated tests to match new bracket-notation params and error handling behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhairyashiil
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
credentialId/externalIdinstead of the nestedcalendarsToLoad[0][credentialId]/calendarsToLoad[0][externalId]format that the Cal.com v2 controller expects. Also added bracket-decoding inbuildUrlsoURLSearchParamsdoesn't percent-encode [/]."Error 400: Cal.com API error (400)"with no details. Now the full response body is included, and error messages are extracted from bothbody.messageandbody.errorfields.to object-only with a description listing all 8 valid types.