sendError sends an error response
(id interface{}, code int, message string)
| 410 | |
| 411 | // sendError sends an error response |
| 412 | func (s *Server) sendError(id interface{}, code int, message string) { |
| 413 | resp := Response{ |
| 414 | JSONRPC: "2.0", |
| 415 | ID: id, |
| 416 | Error: &ResponseError{ |
| 417 | Code: code, |
| 418 | Message: message, |
| 419 | }, |
| 420 | } |
| 421 | s.sendMessage(resp) |
| 422 | } |
| 423 | |
| 424 | // SendNotification sends a notification to the client. |
| 425 | // |
no test coverage detected