// writeErrorResponse write error resp.
writeErrorResponse write error resp.
// writeErrorResponse write error resp .
func writeErrorResponse(rw http.ResponseWriter, status int, msg string) {
	rw.Header().Add("Content-Type", "application/json")
	rw.WriteHeader(status)
	err := json.NewEncoder(rw).Encode(ErrorResponse{
		Message: msg,
	})
	if err != nil {
		logger.Errorf("Unable to send error message, %s", err)
	}
}
func writeErrorResponse ( rw http . ResponseWriter , status int , msg string ) { rw . Header ( ) . Add ( " " , " " ) rw . WriteHeader ( status ) err := json . NewEncoder ( rw ) . Encode ( ErrorResponse { Message : msg , } ) if err != nil { logger . Errorf ( " " , err ) } }
writeErrorResponse write error resp.
writeErrorResponse write error resp .