fix(output): unwrap nested error objects; fix --result-type docs; agent-help name-vs-UUID examples - #88
Merged
Merged
Conversation
…sult-type docs
Auth failures come back as {"error":{"code":403,"message":"Invalid bearer
token"}}. extractErrorDetail only accepted string values for detail/message/
error, so the whole object was re-serialised into the "error" field:
"error": "{\"error\":{\"code\":403,\"message\":\"Invalid bearer token\"}}".
Descend one level into an object-valued key and take its message/detail.
CLAUDE.md and a comment in output.go referred to a --result-type flag that
does not exist; CSV/XLSX come from query run's "resultType" body field.
agent-help's "some positionals take a NAME" note gains the other cases that
tripped a scripted sweep: delete-branch, labels, document labels, and the
membership-ID argument of users get-model-roles. The spec and --help already
describe each of these correctly; this is a cross-cutting reminder only.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ei8UYaG1bW5PJhk93EaqzA
dspangen
reviewed
Aug 28, 2026
dspangen
left a comment
Contributor
There was a problem hiding this comment.
Codex says:
One minor documentation issue; no functional defects found.
[P3] Remove the remaining obsolete flag reference
cmd/omni/output_test.go:188 still says XLSX is selected with --result-type, although this PR establishes that the flag does not exist. Please update it to reference the query run body’s resultType field so the cleanup is complete.
The nested error extraction itself looks correct and preserves existing fallback behavior. GitHub CI reports both lint and test passing.
dspangen
approved these changes
Aug 28, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ei8UYaG1bW5PJhk93EaqzA
Collaborator
Author
|
Fixed in f926995 — |
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.
Three small things from a full sweep of the CLI against a playground instance.
Nested error bodies.
{"error":{"code":403,"message":"Invalid bearer token"}}(what a bad token returns) was surfaced as the whole object re-serialised into"error".extractErrorDetailnow descends one level into an object-valueddetail/message/errorkey. Before/after:Test added; fallback to the raw body is unchanged when no message is found.
Docs.
CLAUDE.mdand anoutput.gocomment referred to a--result-typeflag that doesn't exist — CSV/XLSX come fromquery run'sresultTypebody field.agent-help. The existing "some positionals take a NAME, not a UUID" note gains the other cases that tripped a scripted sweep (
delete-branch,labels get,documents add-label,users get-model-roles <membership-id>). The spec and--helpalready describe each correctly; this is reinforcement only, easy to drop if unwanted.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ei8UYaG1bW5PJhk93EaqzA