Merge PR #3691: Minor Error Message Cleanup
* cleanup error messages * Add pending log entry * Rename Message to Error in ErrorResponse
This commit is contained in:
committed by
frog power 4000
parent
ab9de3a7f1
commit
992dc8b2dc
+4
-4
@@ -111,13 +111,13 @@ func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.Codec, req i
|
||||
|
||||
// ErrorResponse defines the attributes of a JSON error response.
|
||||
type ErrorResponse struct {
|
||||
Code int `json:"code,omitempty"`
|
||||
Message string `json:"message"`
|
||||
Code int `json:"code,omitempty"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
// NewErrorResponse creates a new ErrorResponse instance.
|
||||
func NewErrorResponse(code int, msg string) ErrorResponse {
|
||||
return ErrorResponse{Code: code, Message: msg}
|
||||
func NewErrorResponse(code int, err string) ErrorResponse {
|
||||
return ErrorResponse{Code: code, Error: err}
|
||||
}
|
||||
|
||||
// WriteErrorResponse prepares and writes a HTTP error
|
||||
|
||||
Reference in New Issue
Block a user