CLI sync remote-graphs reports transport failures as successful graph data
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 28
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Search first
- I searched open and closed issues and found no report for this CLI result-shaping behavior.
What happened?
When the remote graph request fails at the transport layer, logseq sync remote-graphs --output json can return exit code 0 and a top-level success response containing a serialized JavaScript error as if it were a graph.
Observed output:
{
"status": "ok",
"data": {
"graphs": [
{
"tag": "js/Error",
"value": {"message": "fetch failed"}
}
]
}
}
The underlying failure in this reproduction was a certificate-chain error, but the same result-shaping problem should apply to other rejected fetches.
Reproduce
- Configure an authenticated sync endpoint that causes Node fetch to reject.
- Run
logseq --graph <local-graph> --output json sync remote-graphs. - Observe the JSON and process exit status.
Expected behavior
- Return a non-zero exit status.
- Return top-level
status: error. - Preserve a sanitized error code and root cause.
- Never include
js/Errorobjects in thegraphscollection.
Platform
- Current CLI repository build
- Node 22 on macOS arm64
- Custom DB Sync endpoint
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CLI entry point for sync remote-graphs and the JSON response shaping around rejected fetches. Reproduce the failure with logseq --graph <local-graph> --output json sync remote-graphs, then verify that transport failures produce a non-zero exit, top-level status: error, a sanitized cause, and no js/Error entries in graphs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100