Skip to content

Substreams RPC should return InvalidArgument error gRPC code when cursor is after stop block num #556

@maoueh

Description

@maoueh

If you have a cursor misconfigured and you try to start a request with it but with less blocks, you receive such error:

2024-10-23T10:20:28.010-0400 ERRO (substreams-sink-files) substreams encountered a retryable error {"error": "rpc error: code = Internal desc = build request details: invalid_argument: StartCursor \"c1:17:20999999:215f1fa046ff46999f1a91973d7cc39c6d4e7aa64d3de3a40d31591f543c3386:20999999:215f1fa046ff46999f1a91973d7cc39c6d4e7aa64d3de3a40d31591f543c3386\" is after StopBlockNum 12426741"}

However, the rpc error code returned is Internal, this indicates potential retry. The code here should have been InvalidArgument, the substreams-sink library does not retry in InvalidArgument error as it indicates operator error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions