Handle and render server-side errors
developWhen the server returns an error (distinct from standard input validation errors, such as unexpected system failures), follow these UI patterns:
- Within a Form: Display the error as general form error feedback within the form's UI.
- Outside a Form: Display the error using a flash message.
- Important: If the error occurs inside a modal window, you MUST close the modal before showing the flash message to ensure the user actually sees it.