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

Wrap results in something indicating the type of the result #31

Closed
Stebalien opened this issue Dec 1, 2017 · 2 comments
Closed

Wrap results in something indicating the type of the result #31

Stebalien opened this issue Dec 1, 2017 · 2 comments

Comments

@Stebalien
Copy link
Member

That is, either:

{
    "Type": "error",
    "Code": 0,
    "Message": "my message"
}

Or:

{
    "Type": "value",
    "Value": { /* ... */ }
}

Currently, one can break the API as follows:

> ipfs dag put <<<'{"Message": "the api is broken", "Code": 0, "Type": "error"}'
zdpuAxiFRrxtmMmFRZx145LufQsKTw8is1ZgfTQX4vgzgb8DB

> ipfs dag get zdpuAxiFRrxtmMmFRZx145LufQsKTw8is1ZgfTQX4vgzgb8DB
Error: the api is broken
@Stebalien
Copy link
Member Author

Note: we may end up just replacing this entire system before we get to this.

@keks
Copy link
Contributor

keks commented Apr 14, 2018

Note: we may end up just replacing this entire system before we get to this.

This. Changing the way we send values over the wire breaks backwards-compatibility, so let's just design a sane protocol from ground up. See #37.

@keks keks closed this as completed Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants