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
|
return
|
||||||
} else {
|
} else {
|
||||||
w.WriteHeader(code)
|
w.WriteHeader(code)
|
||||||
genericError, sErr := json.Marshal(msg)
|
errorPayload := ErrorResponse{Code: code, Message: msg}
|
||||||
|
genericError, sErr := json.Marshal(errorPayload)
|
||||||
if sErr != nil {
|
if sErr != nil {
|
||||||
panic(sErr)
|
panic(sErr)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user