// WriteError writes the error message to the http response stream.
WriteError writes the error message to the http response stream.
// WriteError writes the error message to the http response stream .
func WriteError(w http.ResponseWriter, err error) {
	statusCode := http.StatusBadRequest
	response := &ErrorResponse{
		Message: err.Error(),
	}
	WriteJSON(w, statusCode, response)
}
func WriteError ( w http . ResponseWriter , err error ) { statusCode := http . StatusBadRequest response := & ErrorResponse { Message : err . Error ( ) , } WriteJSON ( w , statusCode , response ) }
WriteError writes the error message to the http response stream.
WriteError writes the error message to the http response stream .