Skip to content

[V2] Protocol: mark errors prop required #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

skryukov
Copy link
Contributor

This PR updates the protocol to standardize error handling across protocol adapters.

I want to ensure consistent behavior for the errors property across all adapter implementations:

  • Laravel adapter already returns "errors": {} prop by default
  • TypeScript types in core library expect errors to be present
  • However, Rails adapter, for example, now includes errors prop by default

This change should help to synchronize error handling behavior across the entire protocol.

@joetannenbaum
Copy link
Contributor

Good catch, thank you 👍

@joetannenbaum joetannenbaum merged commit 616bda0 into inertiajs:v2 Apr 10, 2025
skryukov added a commit to skryukov/inertia-rails that referenced this pull request Apr 10, 2025
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