func ErrorResponse(err errors.HttpError) Response {
	body, e := err.Write()
	if e != nil {
		return Response{
			Status: http.StatusInternalServerError,
			Body:   []byte(e.Error()),
		}
	}

	return Response{
		Status: err.Status,
		Body:   body,
	}
}
// ErrorResponse returns a non-successful response
ErrorResponse returns a non-successful response
// ErrorResponse returns a non - successful response
func ErrorResponse(err errors.HttpError) Response {
	body, e := err.Write()
	if e != nil {
		return Response{
			Status: http.StatusInternalServerError,
			Body:   []byte(e.Error()),
		}
	}
	return Response{
		Status: err.Status,
		Body:   body,
	}
}
func ErrorResponse ( err errors . HttpError ) Response { body , e := err . Write ( ) if e != nil { return Response { Status : http . StatusInternalServerError , Body : [ ] byte ( e . Error ( ) ) , } } return Response { Status : err . Status , Body : body , } }
ErrorResponse returns a non-successful response
ErrorResponse returns a non - successful response