Files
simplegit/gitrpc/jsonrpc.go
T
2026-07-15 11:06:48 -04:00

20 lines
440 B
Go

package gitrpc
import "encoding/json"
type rpcError struct {
Code int `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data,omitempty"`
}
func (e *rpcError) Error() string { return e.Message }
func newError(code int, msg string) *rpcError { return &rpcError{Code: code, Message: msg} }
const (
codeRepoNotFound = -32000
codeInvalidParams = -32602
codeInternalError = -32603
)