func WriteError(w http.ResponseWriter, code int, origin string, resp_body []byte) {
	if ep.ReqErr(code) { // 4xx err
		e := fmt.Sprintf("%s:(%d) %s", origin, code, string(resp_body))
		log.Printf(e)
		http.Error(w, e, http.StatusBadRequest)
	} else { // 5xx err
		e := fmt.Sprintf("%s:(%d) Server Error", origin, code)
		log.Printf(e)
		http.Error(w, e, http.StatusInternalServerError)
	}
}
// WriteError is a convenience wrapper for emitting an error.
WriteError is a convenience wrapper for emitting an error.
// WriteError is a convenience wrapper for emitting an error .
func WriteError(w http.ResponseWriter, code int, origin string, resp_body []byte) {
	if ep.ReqErr(code) { 
		e := fmt.Sprintf("%s:(%d) %s", origin, code, string(resp_body))
		log.Printf(e)
		http.Error(w, e, http.StatusBadRequest)
	} else { 
		e := fmt.Sprintf("%s:(%d) Server Error", origin, code)
		log.Printf(e)
		http.Error(w, e, http.StatusInternalServerError)
	}
}
func WriteError ( w http . ResponseWriter , code int , origin string , resp_body [ ] byte ) { if ep . ReqErr ( code ) { e := fmt . Sprintf ( " " , origin , code , string ( resp_body ) ) log . Printf ( e ) http . Error ( w , e , http . StatusBadRequest ) } else { e := fmt . Sprintf ( " " , origin , code ) log . Printf ( e ) http . Error ( w , e , http . StatusInternalServerError ) } }
WriteError is a convenience wrapper for emitting an error.
WriteError is a convenience wrapper for emitting an error .
// 4xx err // 5xx err