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

API error response should be clearly distinguishable from the successful one #522

Open
azasypkin opened this issue Jun 9, 2016 · 0 comments

Comments

@azasypkin
Copy link
Member

Based on #520 (comment)

it's a bit hard to distinguish successful response with value and failed one (especially for batch requests where response code should be 200 in any case):

  • {"OpenZWave-d32394d4-01000000024c0000":"Closed"};
  • {"OpenZWave-d32394d4-01000000024c0000":{"Error":{"OperationNotSupported": ...}}

Currently we rely on Error property of returned object, but that's dumb :) Theoretically valid value can be object with Error property. Something like this {"OpenZWave-d32394d4-01000000024c0000":{ value: "Closed", error: {"OperationNotSupported": ...}} would probably be less confusing.

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

No branches or pull requests

1 participant