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
jsonrpc2.wireError type is not exported, but contains useful information.
As jsonrpc2.AsyncCall.Await() returns an error, when a JSON-RPC2 error is returned by the server side, it is not possible for the caller to guess it is really a server error and also to access data it contains.
jsonrpc2.wireError
type is not exported, but contains useful information.As
jsonrpc2.AsyncCall.Await()
returns anerror
, when a JSON-RPC2 error is returned by the server side, it is not possible for the caller to guess it is really a server error and also to access data it contains.The proposal is simply to rename
jsonrpc2.wireError
tojsonrpc2.Error
as done in https://go-review.googlesource.com/c/exp/+/415615This way the caller can do a type assertion to check it is a server error, and then access the already exported fields.
The backward compatibility is not broken as the previous
jsonrpc2.wireError
type was not exported.The text was updated successfully, but these errors were encountered: