Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Remove unused property in response object. #61

Merged
merged 6 commits into from
Dec 9, 2014

Conversation

horiuchi
Copy link

I made sure that only one of the result or error will exist.
via. http://www.jsonrpc.org/specification#response_object

@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) when pulling ca02799 on horiuchi:response-format into 20b9a7e on uber:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.77%) when pulling 1903bab on horiuchi:response-format into 20b9a7e on uber:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.58%) when pulling b8b1d60 on horiuchi:response-format into 20b9a7e on uber:master.

function setDefaultProperty(data) {
var outObj = {};
if (data.hasOwnProperty('jsonrpc')) {
outObj.jsonrpc = data.jsonrpc;
Copy link

Choose a reason for hiding this comment

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

I'm not sure this is appropriate. multitransport-jsonrpc still is not JSON-RPC 2.0 compliant, so we shouldn't pretend it is.

Copy link
Author

Choose a reason for hiding this comment

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

My pull requests will support JSON-RPC 2.0. And this PR should be last change.

Copy link

Choose a reason for hiding this comment

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

Oh really? I'll admit I only did a cursory search, but is there a good integration test suite for JSON-RPC 2.0 that we could run multitransport-jsonrpc through? (If not, I think I'll start working on such a project.)

And thank you for getting this past the last mile on 2.0 compatibility. :) It's unfortunately not been a very high priority internally, since the current code has worked just fine.

@dfellis
Copy link

dfellis commented Dec 1, 2014

Sorry for just getting to this. You opened the diff right at the beginning of a major US holiday (Thanksgiving). ;)

A few minor comments. I feel this is definitely the right direction. :)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.73%) when pulling 2ac1355 on horiuchi:response-format into 20b9a7e on uber:master.

if(error) {
outObj.result = null;
outObj.error = errorObject.internalError;
Copy link

Choose a reason for hiding this comment

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

Because of this change here, the else branch here can never be hit. Can you remove that from the codebase?

@dfellis
Copy link

dfellis commented Dec 2, 2014

I'm trying to figure out how it's possible, but somehow the test that hits this codepath is no longer working, but it's tests are passing. We can't merge this until one of us figures out why this regression has occurred.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.77%) when pulling 3178b54 on horiuchi:response-format into 20b9a7e on uber:master.

@dfellis
Copy link

dfellis commented Dec 9, 2014

@horiuchi I just loaded the latest master and ran the unit tests and those three lines aren't hit on master, either. I have no idea why coveralls is saying they were recently lost.

If you want to re-revert that "change response error format", feel free, I'll merge after your answer either way. :)

@horiuchi
Copy link
Author

horiuchi commented Dec 9, 2014

@dfellis Thank you for checking on master branch. NodeJs may be changed effect?

I think it's better not to change the commit. Please, merge this pull request.

dfellis pushed a commit that referenced this pull request Dec 9, 2014
Remove unused property in response object.
@dfellis dfellis merged commit 4c81d14 into uber-archive:master Dec 9, 2014
@dfellis
Copy link

dfellis commented Dec 9, 2014

Alright! Published as 0.8.0 :D

@horiuchi
Copy link
Author

horiuchi commented Dec 9, 2014

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants