Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

return 500 status codes properly when a Stacks block could not be ingested #646

Description

@rafaelcr

The HTTP server that consumes data from the Stacks node always returns a 200 status code regardless if the block has been ingested correctly or not, because the response handlers never actually return an error, the error is only reflected in the body:

return Json(json!({
    "status": 500,
    "result": format!("Unable to standardize stacks block {}", e),
}));

Because of this, the Stacks node continues to advance the chain creating gaps in the index that are impossible to recover from. This is related to #623

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions