Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forward error types as their string representation (#131)
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.
- Loading branch information