Repository navigation
selfdispatch: a failed statement fills receipt.error - #66
Merged
Merged
Conversation
asubbarao
enabled auto-merge
October 18, 2026 22:55
Owner
Author
|
duckstack/rules: failure
duckstack review queue, rule gate (hooks/hook_checks.sql) |
Owner
Author
|
duckstack/rules: failure
duckstack review queue, rule gate (hooks/hook_checks.sql) |
dev's /sql answers a failed statement with 422/500 and the DuckDB error in the body's detail; quackapi_post sets error only when the post itself fails, so every failed statement came back with error NULL. The macro now carries the detail into error. Approved by Alok 2026-10-18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
asubbarao
force-pushed
the
fix/selfdispatch-error
branch
from
October 19, 2026 17:17
eb1547a to
e15ab58
Compare
Owner
Author
|
duckstack/rules: success
duckstack review queue, rule gate (hooks/hook_checks.sql) |
Owner
Author
|
duckstack/review: success No findings. Opus 5.5, duckstack review queue (duckstack-review skill) |
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.
Written by Opus 5.5 (Claude Code); Alok approved this macro change on 2026-10-18.
Problem: a self-dispatched statement can fail while the receipt still shows
erroras NULL. Dev's/sqlanswers a failure with 422 or 500 and puts the DuckDB error in the body'sdetail.quackapi_postfillserroronly when the post itself fails, for example a refused connection or a timeout.Change: one macro in
server/macros.sql. On any non-200 response,selfdispatchcopiesdetailintoerror. The receipt keeps the same three fields (status, body, error), so existing callers don't change. The post sits inside a one-elementlist_transform, so it is sent once; a macro argument used twice would post twice.Tested by loading the exact macro in a local client that posts to dev:
SELECT 42 AS answerread_csv('/nonexistent/file.csv')No files found that match the pattern "/nonexistent/file.csv" …After this merges,
WHERE receipt.error IS NOT NULLfinds every failed row. Merging changesserver/, so the watcher restarts dev.🤖 Generated with Claude Code