Your AdonisJS ecosystem, in the loop.
All insights
release

Error bags no longer block `onSuccess` callback in Inertia

· Developer impact : medium

In Inertia v5.0.5, when using error bags (e.g., `errorBag: 'createUser'`), the client previously treated any error bag key as a failed submission, causing `onSuccess` not to be called even if validation passed. Now, `getValidationErrors()` returns an empty object `{}` when there are no errors, allowing `onSuccess` to be triggered correctly.

What this means for your code

Developers who used error bags in Inertia forms might have experienced `onSuccess` callbacks not firing due to empty error bags being interpreted as errors. This update fixes that behavior, so dialogs or UI elements relying on `onSuccess` will now behave as expected without workarounds.

  • Remove any middleware workarounds that filtered out empty error bags in Inertia submissions, as they are no longer necessary.

Original sources

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.

Independent ecosystem watch. Sources linked in every insight.Built with AdonisJS · AI-assisted summariesBy Jérémy Chaufourier · chaufourier.fr