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

Add user advice to UnableToDetermineCurrentEpoch error. #1992

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

jonathanknowles
Copy link
Member

Issue Number

#1939

Overview

This PR revises the error we show if we cannot determine the current epoch, inviting the user to wait and try again.

Comments

Ideally, we'd be able to give the user some indication of how long they should wait, but assuming we cannot reliably know this information, letting them know that waiting may resolve the issue is arguably better than giving no advice at all.

Ideally, we'd be able to give the user some indication of how long they
should wait, but assuming we cannot reliably know this information,
letting them know that waiting may resolve the issue is arguably better
than giving no advice at all.
@jonathanknowles jonathanknowles self-assigned this Aug 3, 2020
@rhyslbw rhyslbw self-requested a review August 3, 2020 05:27
"I'm unable to determine the current epoch."
apiError err500 UnableToDetermineCurrentEpoch $ mconcat
[ "I'm unable to determine the current epoch. "
, "Please wait a while for the node to sync and try again."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's unexpected for a node client to not know which epoch they are in at any time, it might be helpful to add a little detail as to why this cannot be known. If it's too complex to provide over an error message, maybe a link to some docs would be something to add later when available. I assume this is a common issue for chain-sync clients.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's too complex to provide over an error message, maybe a link to some docs would be something to add later when available.

This sounds like a sensible suggestion. 👍

From conversations with @Anviking, it seems that this situation will only occur very rarely, around the time of a hard fork, and when a node is not yet fully in sync. I think if we do start seeing reports of this error in the wild, we can look into adding more information to the error.

@jonathanknowles
Copy link
Member Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 3, 2020

Build succeeded

@iohk-bors iohk-bors bot merged commit d51b74d into master Aug 3, 2020
@iohk-bors iohk-bors bot deleted the jonathanknowles/improve-current-epoch-error branch August 3, 2020 06:38
@jonathanknowles jonathanknowles added the IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG label Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants