Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrServerInternal = 0 // server internal error ErrJSONDecode = 1 // failed unmarshalling incoming request )
Variables ¶
This section is empty.
Functions ¶
func SendErrorJSON ¶
func SendErrorJSON(w http.ResponseWriter, r *http.Request, httpStatusCode int, err error, errCode int, details string)
SendErrorJSON create response JSON in schema {error: err, details: more details, code: 1} json body and responds with error code
Types ¶
Click to show internal directories.
Click to hide internal directories.