Split out commands so we can just import host commands from realm defined commands#4432
Split out commands so we can just import host commands from realm defined commands#4432tintinthong wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ebe1ca5f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { results: atomicResults } = await new ExecuteAtomicOperationsCommand( | ||
| this.commandContext, | ||
| ).execute({ realmUrl, operations }); |
There was a problem hiding this comment.
Preserve stale-spec guidance on atomic install failures
When execute-atomic-operations fails during listing install, the error is now propagated verbatim. This drops the listing-specific handling for the known stale-spec case (filter refers to a nonexistent type), so users get a low-level backend error instead of the actionable "Update Specs" instruction and can’t recover from install failures without manual debugging.
Useful? React with 👍 / 👎.
| if (!doc || !('data' in doc)) { | ||
| throw new Error('We are only expecting single documents returned'); | ||
| } | ||
| delete doc.data.id; | ||
| delete doc.included; | ||
| let cardResource: LooseCardResource = doc?.data; | ||
| delete (doc as any).data.id; |
There was a problem hiding this comment.
Validate fetched card JSON as single-card document
This check only verifies that a data key exists, then treats doc.data as a single card resource. If FetchCardJsonCommand returns a collection-style JSONAPI payload (data array) or another non-single shape, we will construct invalid atomic add operations instead of failing early, which makes installs fail later with harder-to-diagnose errors.
Useful? React with 👍 / 👎.
Preview deployments |
No description provided.