Draft
Conversation
This is an initial commit to start development of this feature in its own feature branch
44ada35 to
7f7579a
Compare
6 tasks
By default go serializes `error` types as an empty struct `{}`, this
patch would adjust that so that errors are serialized as their string
representation by calling `Error()` on any non-nil types that implement
the error interface.
This should be an improvement over the current state as it now allows
identifying the cause of an error from the RPC client. An alternative
could be to serialize the error as a struct of `{"type": <>, "message":
<>}` using reflection to get the type name (and package path) of the
error though I'm not sure if it's necessary and I'd have to check how
easy that would be to get working.
Member
Author
|
If there are no more imminent changes planned, I would like to merge this into the dev branch. We should think of moving the JSON RPC2 interface into its own repo and work on an API design for that as well. What do you think? |
Contributor
|
The only imminent change I had planned would have been dropping the custom serialization of DeviceRemote/EntityRemote, but if I wanted to do that cleanly I'd also have to take a stab at the proposed case normalization in input/output data types. It might make more sense to work on that after this has been split into its own repo as part of the API design. I'm fine with merging this and preparing to split this into its own repo and then moving from there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an initial commit to start development of this feature in its own feature branch.
Please provide PRs against this branch when adding functionalities. The tasks are being coordinated in #130