CreateErrorResponseWithInfo will create a JSON-RPC error response with the given id and error. info is optional and contains additional information about the error. When an empty string is passed it is ignored.
(id interface{}, err Error, info interface{})
| 331 | // CreateErrorResponseWithInfo will create a JSON-RPC error response with the given id and error. |
| 332 | // info is optional and contains additional information about the error. When an empty string is passed it is ignored. |
| 333 | func (c *jsonCodec) CreateErrorResponseWithInfo(id interface{}, err Error, info interface{}) interface{} { |
| 334 | return &jsonErrResponse{Version: jsonrpcVersion, Id: id, |
| 335 | Error: jsonError{Code: err.ErrorCode(), Message: err.Error(), Data: info}} |
| 336 | } |
| 337 | |
| 338 | // CreateNotification will create a JSON-RPC notification with the given subscription id and event as params. |
| 339 | func (c *jsonCodec) CreateNotification(subid, namespace string, event interface{}) interface{} { |