Skip to content

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

@azasypkin

Description

@azasypkin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions