Skip to content

[3.x] Fix flash event not firing when response contains errors#3038

Merged
pascalbaljet merged 1 commit intoinertiajs:3.xfrom
skryukov:fix-flash-event-on-errors
Apr 7, 2026
Merged

[3.x] Fix flash event not firing when response contains errors#3038
pascalbaljet merged 1 commit intoinertiajs:3.xfrom
skryukov:fix-flash-event-on-errors

Conversation

@skryukov
Copy link
Copy Markdown
Contributor

@skryukov skryukov commented Apr 5, 2026

Flash events (fireFlashEvent, onFlash) were silently dropped when the response also contained validation errors, because Response.process() returned early in the error path before reaching the flash event code.

This PR moved flash event firing to happen right after setPage(), before the error check, so flash data is delivered regardless of whether errors are present.

@skryukov skryukov marked this pull request as ready for review April 5, 2026 09:03
@pascalbaljet pascalbaljet merged commit f757d49 into inertiajs:3.x Apr 7, 2026
47 checks passed
@pascalbaljet
Copy link
Copy Markdown
Member

Thanks!

@pascalbaljet pascalbaljet changed the title Fix flash event not firing when response contains errors [3.x] Fix flash event not firing when response contains errors Apr 7, 2026
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