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

Handle Eof error when querying non-existent data at height #88

Open
dtbuchholz opened this issue Sep 30, 2024 · 0 comments
Open

Handle Eof error when querying non-existent data at height #88

dtbuchholz opened this issue Sep 30, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@dtbuchholz
Copy link
Contributor

Summary

When running a read-only query at a height wherein data (e.g., an object store) does not exist, we get an Eof error without context as to why the query failed.

Details

For example, try running the following command (on the "bleeding edge" testnet)—the height value provided is some arbitrary block number prior to the object store being created:

hoku os query --address t2ge4bsavi6uaz5pq4toqwvhhwzav5mw6aryrhjsi --height 100

This logs a cbor Eof error:

Error: error parsing as ListObjectsReturn: Serialization error for Cbor protocol: Eof

Ideally, we should catch this and, at least, log something like invalid height. Depending on the query, perhaps we could provide more context too, like invalid height: object store created at block XXX.

And this probably happens with other APIs, so we should handle those here, too...I'd have to test this out to further confirm.

@dtbuchholz dtbuchholz added bug Something isn't working enhancement New feature or request labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant