Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable API Before Sync and Return 503 When Not Synced #1155

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cranycrane
Copy link

Description:

This PR introduces two changes to improve API behavior during synchronization:

  1. Return HTTP 503 When Not Synced
    API endpoints now return a 503 status if Blockbook is unsynced, helping clients detect incomplete synchronization. Status of the Blockbook in the response was preserved.

  2. Allow API Access Before Sync Completes
    Added an enableAPIBeforeSync flag to optionally allow API access before full sync, useful in read-only scenarios.

Changes:

Updated jsonHandler to return 503 if not synced.
Added enableAPIBeforeSync flag for optional API access during sync.

Impact:

Improves API flexibility for clients by providing better control over sync-dependent responses.

@cranycrane cranycrane marked this pull request as ready for review November 9, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant