-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Better error messages #4416
Comments
Bringing to attention
|
Fixing the merkeldag error messages was discused is in pr. #4099 which seams to have been abandoned. I will be happy to do what I discussed in that issue and take a pass at giving more informative error messages. |
I spend some time working with this, I will create a p.r. in a few days once I figure out something I am reasonable happy with, |
Error: merkledag: not found centos 7 |
After daemon-ed, problem solved. |
@Stebalien many things have changed but the I would assume that we can now take advantange of |
That helps but isn't necessary. We can just fix this. |
It seems that proposed fixes so far have not suceeded to land. How do you want to fix it? |
The proposed fix modified the core ErrNotFound error to say "we're offline". The correct solution would involve:
|
Let's start here: ipfs/go-ipld-format#55 |
This came up during triage today. Inconsistency in errors returned from commands
The lack of deterministic codes makes it impossible to reliably consume errors in userland. Folks will match plaintext message but this may break in the future when someone changes the error message. Proposed suggestion
|
Note that #7074 has the tracking around resolving the Block Not Found errors and the changes would allow each layer to better set the errors as they bubble. |
A user in the Matrix room recently encountered this, here's the issue I created before being pointed to this one: #9179 I disagree with "Then, if the daemon is offline, we can return something like: Giving an error message which directly states that the daemon isn't running, and it should probably give the |
In a discussion on IRC last night, it was brought up that our error messages kinda suck sometimes. I tend to agree (merkledag: not found).
To improve this, we can distinguish between a few different failure modes for common commands:
Then, if the daemon is offline, we can return something like:
data not found locally.
(for context, i also just read this article and enjoyed it)
The text was updated successfully, but these errors were encountered: