-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add /r/parents/:inscription_id/inscriptions
endpoint.
#4088
base: master
Are you sure you want to change the base?
Conversation
The examples in the docs for /r/children/.../inscription* have the full output, so I did the same here. Maybe it makes sense to shorten those examples, too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! The errors in parent_inscriptions_recursive
should be handled, see my comment. In general, errors from the index shouldn't be ignored. unwraps
on Option
s are okay though, when we expect the index to contain the inscription.
.map(|inscription_id| { | ||
let entry = index | ||
.get_inscription_entry(inscription_id) | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These errors should be handled. If the result type of a map is Result<T>
, then you can collect into a Result<Vec<T>>
, which will return an error if any of the results is Result::Err
.
|
||
let satpoint = index | ||
.get_inscription_satpoint_by_id(inscription_id) | ||
.ok() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, this error should be handled.
Analogous to #3771 but for parents instead of children.