Repository navigation
Conversation
🤖 PR meta 🤖👋 Welcome👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @elphizu! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. 🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @kraftner. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
What?
Closes #85089.
Display the original REST API error when pattern creation fails.
Why?
A failed pattern save currently returns
undefined, which is passed to the success callback. This causes a JavaScript error aboutwp_pattern_sync_status, hiding the server’s error message.How?
Pass
{ throwOnError: true }tosaveEntityRecordincreatePattern, allowing the modal’s existing error handler to display the original error.Testing Instructions
Use of AI Tools
OpenAI Codex was used to investigate the issue, PR Description.