You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(runtime): carry spec-validation issues + 422 status through metadata save/publish errors (#2589)
protocol.saveMetaItem throws a field-anchored spec-validation error (status 422,
code invalid_metadata, issues:[{path,message,code}]), but the HTTP dispatcher
collapsed it to a single message (save even hardcoded 400) and publish dropped
issues from each failed[] entry. The Studio could therefore only show a generic
banner, never point at the offending field.
- Add errorFromThrown(e, fallback) dispatcher helper: preserves the error's own
status (validation now surfaces as 422, not a downgraded 400) and attaches
{code, issues} under error.details when present; unchanged for plain errors.
Wired into the meta save (PUT /meta/:type/:name) and publish
(POST /packages/:id/publish-drafts) catch sites.
- publishPackageDrafts carries issues into each failed[] entry.
Server half of "surface validation at the save/publish moment, on the field".
Additive to the error payload; only behavior change is the more-correct 422.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments