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

Added note about error codes #2915

Merged
merged 1 commit into from
Nov 2, 2016
Merged

Conversation

RichardLitt
Copy link
Member

How does this look? See #2293

License: MIT
Signed-off-by: Richard Littauer [email protected]

@RichardLitt RichardLitt added topic/docs-ipfs Topic docs-ipfs need/review Needs a review labels Jun 28, 2016
@RichardLitt RichardLitt changed the title Added note aobout error codes Added note about error codes Jun 28, 2016
@RichardLitt
Copy link
Member Author

@Kubuxu What do you think about this?

@Kubuxu
Copy link
Member

Kubuxu commented Jun 30, 2016

First thing it fails to build as you used backticks as quotes.
Other thing is that error codes from CLI are general knowledge to most users, it would make sense if our error codes had special meanings (type of crash, system that failed), but they don't. This would better fit http-api docs as the purpose of of the Code over there is unclear.

The Code in case of error on http corresponds to https://github.com/ipfs/go-ipfs/blob/master/commands/response.go#L17-L22 where first is 0 and last 2.

@RichardLitt
Copy link
Member Author

Other thing is that error codes from CLI are general knowledge to most users...

I disagree with this - or, rather, I disagree with assuming that this is OK. Offloading knowledge building is important for some things, but I think having a place that says this may be useful to newcomers. I think the code in this PR is easy to put in, and helpful.

I would like there to be more special meanings, too. I know where the codes come from - found that part of the code (thanks for linking it! Makes me feel pretty confident in my CR ability) - and there's a comment there saying this, too. Is there any plan to add more codes?

@whyrusleeping
Copy link
Member

I think that we should instead do something like manpages do for exit status. See man grep or man man and look for EXIT STATUS

@RichardLitt
Copy link
Member Author

How does that look?

How does this look? See #2293

License: MIT
Signed-off-by: Richard Littauer <[email protected]>
@whyrusleeping
Copy link
Member

LGTM

@whyrusleeping whyrusleeping merged commit c408878 into master Nov 2, 2016
@whyrusleeping whyrusleeping deleted the feature/2293-error-codes branch November 2, 2016 20:20
@Kubuxu
Copy link
Member

Kubuxu commented Nov 2, 2016

LGTM

@whyrusleeping whyrusleeping removed the status/in-progress In progress label Nov 2, 2016
@ghost ghost mentioned this pull request Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review topic/docs-ipfs Topic docs-ipfs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants