Final tweak. Slightly better formatting for returned message
This commit is contained in:
parent
3a7077f2d5
commit
b11be2f32c
@ -112,7 +112,8 @@ func (s *VinegarServlet) SendError(w http.ResponseWriter, req *http.Request, cod
|
||||
return
|
||||
} else {
|
||||
w.WriteHeader(code)
|
||||
genericError, sErr := json.Marshal(msg)
|
||||
errorPayload := ErrorResponse{Code: code, Message: msg}
|
||||
genericError, sErr := json.Marshal(errorPayload)
|
||||
if sErr != nil {
|
||||
panic(sErr)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user