Loading
fix: #3634859 Show an error on the page when the Generate request fails
Issue: https://www.drupal.org/project/ai_media/issues/3634859
When the Generate request failed in the browser (network error or non-2xx), the button came back and the failure was only announced, so a sighted editor saw nothing.
The message "This could not be made. Try again." now shows as an error below the description, on both the Media Library and the Add media page, and goes away on the next press.
Before: a failed Generate request shows nothing on the page.
After: the error shows below the description.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
Edited by Rajab Natshah

