Skip to content

Commit 0d6c5dd

Browse files
committed
docs(changeset): scope the sandbox limit the same way as the docs
The entry lands verbatim in the emdash CHANGELOG and carried the absolute that 003597d narrowed everywhere else.
1 parent 774dcee commit 0d6c5dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.changeset/before-save-rejection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"emdash": minor
33
---
44

5-
Adds `ContentSaveRejectedError` so a `content:beforeSave` hook can reject a save with a message for the editor. Throwing it from a trusted plugin makes the content API respond with a structured `SAVE_REJECTED` error (HTTP 422) that carries the message, and the admin shows it in the save and autosave toasts. Any other exception thrown by the hook still cancels the save, but now returns a generic `CONTENT_HOOK_ERROR` response instead of escaping as an unstructured 500 that could leak exception details. Sandboxed plugins cannot reject saves yet; their hook errors are logged and the save proceeds, as before.
5+
Adds `ContentSaveRejectedError` so a `content:beforeSave` hook can reject a save with a message for the editor. Throwing it from a trusted plugin makes the content API respond with a structured `SAVE_REJECTED` error (HTTP 422) that carries the message, and the admin shows it in the save and autosave toasts. Any other exception thrown by the hook still cancels the save, but now returns a generic `CONTENT_HOOK_ERROR` response instead of escaping as an unstructured 500 that could leak exception details. A plugin running in the sandbox cannot reject a save yet; the sandbox logs its hook errors and the save proceeds, as before. Moving the plugin into `plugins: []` runs it in the host process, where rejection works.

0 commit comments

Comments
 (0)