func (e ErrorList) StatusCode() int {
	if len(e) == 0 {
		return 0
	}
	return e[0].Status
}
/*
StatusCode (HTTP) of the first error in the list. Defaults to 0 if the list is
empty or one has not yet been set for the first error.
package jsh
import (
	"fmt"
	"net/http"
	"strings"
)
var DefaultErrorDetail = "Request failed, something went wrong."
var DefaultErrorTitle = "Internal Server Error"
type ErrorType interface {
	Error() string
	Validate(r *http.Request, response bool) *Error
	StatusCode() int
}
type ErrorList []*Error
func (e ErrorList) Validate(r *http.Request, response bool) *Error {
	for _, err := range e {
		validationErr := err.Validate(r, response)
		if validationErr != nil {
			return validationErr
		}
	}
	return nil
}
func (e ErrorList) Error() string {
	var msg string
	for _, err := range e {
		msg += fmt.Sprintf("%s\n", err.Error())
	}
	return msg
}