You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to serialize an error to an exact representation, because error is just an interface, and merry is just a linked list of error interfaces.
You could define a JSON schema for an error that contains the main error attributes merry supports (like HTTP code, user message, stacktrace, source line, etc), or you could try serializing the result of merry.Details(err), but that is a little dangerous, since you don't know the types of the values in that map, and not all types serialize to JSON.
In most RPC APIs I've seen, there is an error structure defined by the API. That error structure is often language-agnostic, so it can be implemented by any language that implements the API. Golang errors (including merry errors) would be converted to and from that API error structure.
No description provided.
The text was updated successfully, but these errors were encountered: