Skip to content

Pipecat Cloud API: update the validation error example - #1630

Merged
mattshep merged 1 commit into
mainfrom
openapi-validation-error-example
Nov 3, 2026
Merged

mattshep merged 1 commit into
mainfrom
openapi-validation-error-example

Conversation

@mattshep

@mattshep mattshep commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The 400 example on the Pipecat Cloud REST reference shows validation issue fields that change in the next API release, when the API moves to zod 4.

  • Fields: code becomes invalid_value, options becomes values, and received goes away.
  • Unchanged: path, message, and the issues and name wrapper.

The new example is the real output of the API's validation for this status parameter.

Please hold the merge until that API release is in production. Until then, the current example still matches what's live.

A 400 validation issue now has code invalid_value and lists its options under
values, and no longer has a received field. Its path and message are unchanged.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Mintlify preview for this branch: https://daily-openapi-validation-error-example.mintlify.site

@mattshep
mattshep requested a review from cbrianhill November 3, 2026 00:05
@mattshep mattshep self-assigned this Nov 3, 2026

@cbrianhill cbrianhill left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code contributed to this review.

Recommended comment; Brian approved. The updated field names match what the API returns after the validation-library upgrade, so nothing in the content needs changing; the one open item is that the requested merge hold is not enforced by anything.

No findings.

Verified:

  • The three renamed/removed fields and the unchanged message wording both check out against the API: zod 4.4.3's invalid_value issue carries values and strips the offending input in finalizeIssue, while api/src/utils/zod3.ts restores zod 3's Invalid enum value. Expected ... received '...' text through z.config({ customError }).
  • The issues / name wrapper and the top-level "code": "400" survive the upgrade because the new handler builds them explicitly (api/src/utils/errors.ts:186-213, with GENERIC_BAD_REQUEST = '400' at line 79). zod 4 makes issues non-enumerable on the error object, so this only holds because the handler stopped serializing the error directly.
  • This is the only validation-error example in the docs repo; code search for invalid_enum_value, ZodError and Invalid parameters each returns this one file.

The description's field list matches what the new validation layer actually emits, including the removal of received, which zod 4 does not report unless input reporting is explicitly enabled.

@mattshep
mattshep merged commit c7d1b2d into main Nov 3, 2026
5 checks passed
@mattshep
mattshep deleted the openapi-validation-error-example branch November 3, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants