Repository navigation
fix(get-block): sanitize public error responses and return 404 for unarchived epochs - #109
Merged
Merged
Conversation
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
GET /block/:slot.{json,bin},GET /block-lite/:slot.json, andGET /block/:slot.resolutionso internal storage backend details (S3 GET,R2 GET ... via <binding>, archive prefixes,.index/.markerobject keys, and upstream internal error strings) are never leaked to clients, while retaining full diagnostics in internal Worker observability logs viaconsole_error!.404for unarchived/future epochs instead of502or falseresult: null:404(Cache-Control: no-store) with Solana JSON-RPC-32004("Block not available for slot <slot>")..binroutes return HTTP404(Cache-Control: no-store) with{"ok": false, "error": {"code": "block_unavailable", ...}}.503 recent_unavailablewhenrecent_archive_lookupis active (ARCHIVE_LOOKUP_REQUIRED) and still treats missing data blobs (.zstd, registries) within an existing epoch as502backend errors.Verification
classifies_missing_primary_index_objects_without_matching_other_failures)workerdintegration suite (scripts/test-worker.mjs) acrosssparseanddenseindex layouts verifying unarchived slot404(-32004/block_unavailable) and zero path/backend leakage on404&502responses