Created
July 19, 2018 11:25
-
-
Save dcb9/c4fef038a0c38c2d8b5dd08dcff3f83d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
modified: pkg/proxy/transport.go | |
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
@ transport.go:46 @ func (p *proxy) RoundTrip(httpReq *http.Request) (resp *http.Response, err error | |
return nil, err | |
} | |
var result *rpc.JSONRPCResult | |
result := rpc.NewJSONRPCResult() | |
if err = json.Unmarshal(body, &result); err != nil { | |
level.Error(p.logger).Log("err", err, "body", body) | |
return nil, err | |
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
modified: pkg/rpc/jsonrpc.go | |
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
@ jsonrpc.go:35 @ type JSONRPCError struct { | |
func (err *JSONRPCError) Error() string { | |
return fmt.Sprintf("[code: %d] %s", err.Code, err.Message) | |
} | |
func NewJSONRPCResult() *JSONRPCResult { | |
return &JSONRPCResult{ | |
JSONRPC: "2.0", | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment