fix(actions): a failed server action no longer reports as success (green toast) - #2963
Merged
Merged
Conversation
…een toast)
objectstack#3913. `useConsoleActionRuntime.serverActionHandler` — the console's
main action path (list toolbars, row actions, page actions) — decided success
from `res.ok` and the OUTER envelope only. A server older than objectstack#3913
reports a handler failure as HTTP 200 with the failure nested one level down:
{"success":true,"data":{"success":false,"error":"Action '…' not found"}}
Both guards pass, so the action was reported as completed: the ActionRunner
fired its green "completed" toast, the list refreshed, and the real error was
swallowed. RecordDetailView's copy of the handler already inspected the inner
envelope; the shared runtime now does too, as does marketplaceApi.installPackage,
which had the identical hole and could report a package as installed when it was
not.
Current servers answer a failed action with a real HTTP status, which `!res.ok`
catches first — the inner-envelope check is what keeps the console honest
against a runtime that has not been upgraded yet.
Also: with objectstack#3913 the failure body is {success:false, error:{message,
code}}. RecordDetailView read `json?.error` raw and would have handed that
OBJECT to toast.error() as a React child, crashing the page (React #31) — the
exact failure the runtime's `errorDetail` helper existed to prevent. That helper
is now a shared util (utils/actionErrorDetail) and both call sites use it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011AvZj6cLX7APd7roh2eK4F
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to objectstack-ai/objectstack#3913 (server fix: objectstack-ai/objectstack#3930). The issue names this side explicitly — "the shipped console does exactly that on its main action path… so global-action failures produce a green success toast".
The hole
useConsoleActionRuntime.serverActionHandler— the console's main action path (list toolbars, row actions, page actions) — decided success fromres.okand the OUTER envelope only:A server older than objectstack#3913 reports a handler failure as HTTP 200 with the failure nested one level down:
{"success":true,"data":{"success":false,"error":"Action 'log_call' on object '*' not found"}}Both guards pass. The action was reported as completed: the ActionRunner fired its green "completed" toast, the list refreshed, and the real error was swallowed.
RecordDetailView's copy of the same handler already inspected the inner envelope — this brings the shared runtime to parity, plusmarketplaceApi.installPackage, which had the identical hole and could report a package as installed when it was not.Current servers answer a failed action with a real HTTP status, which
!res.okcatches first. The inner-envelope check is what keeps the console honest against a runtime that has not been upgraded yet — worth keeping, not a transitional shim.Second defect this surfaced
With objectstack#3913 the failure body is
{success: false, error: {message, code}}.RecordDetailViewreadjson?.errorraw:That hands an object to
toast.error()as a React child and crashes the page (React #31) — the exact failureuseConsoleActionRuntime's localerrorDetailhelper was written to prevent. The helper is now a shared util (utils/actionErrorDetail) and both call sites go through it, so a nested{message}always resolves to a string.Testing
app-shellsuite: 1918 passed (232 files).type-checkclean; eslint 0 errors on the changed files.useConsoleActionRuntime.test.tsx: the inner-success:falsefailure, the nested{error:{message}}→ string resolution, and a success guard so the new check can't turn a good action into a failure.|| innerFailedguard removed it fails, and passes with it.🤖 Generated with Claude Code
https://claude.ai/code/session_011AvZj6cLX7APd7roh2eK4F
Generated by Claude Code