fix: add gateway check and diagnostics to sync endpoint#211
Open
isaacrowntree wants to merge 1 commit intocloudflare:mainfrom
Open
fix: add gateway check and diagnostics to sync endpoint#211isaacrowntree wants to merge 1 commit intocloudflare:mainfrom
isaacrowntree wants to merge 1 commit intocloudflare:mainfrom
Conversation
The manual sync endpoint was returning 500 errors when triggered before the gateway had started (or when config files were missing). This adds: - Gateway-running check before attempting sync (returns 409 if not ready) - Diagnostic info when config files are missing: checks gateway status, gateway logs, local config directory contents, R2 backup contents, and R2 mount health - Correct HTTP status codes (400 for client errors, not 500) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8b5a3ee to
f4be6d1
Compare
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.
Summary
Fixes #214
When the sync endpoint is called and the config file check fails, this PR adds diagnostic information to help understand why:
/root/.openclaw/directory contents.last-syncfileAlso adds a gateway-running pre-check to the sync endpoint, returning 409 if the gateway isn't running yet.
Note: This PR provides diagnostics for the sync failure. The root cause fix for
exitCodereturningnullis in #215.Test plan
🤖 Generated with Claude Code