func newRequestError(err Error, statusCode int, requestID string) *requestError {
	return &requestError{
		awsError:   err,
		statusCode: statusCode,
		requestID:  requestID,
	}
}
newRequestError returns a wrapped error with additional information for
request status code, and service requestID.

Should be used to wrap all request which involve service requests. Even if
the request failed without a service response, but had an HTTP status code
that may be meaningful.

Also wraps original errors via the baseError.
package awserr
import "fmt"
func SprintError(code, message, extra string, origErr error) string {
	msg := fmt.Sprintf("%s: %s", code, message)
	if extra != "" {
		msg = fmt.Sprintf("%s\n\t%s", msg, extra)
	}
	if origErr != nil {
		msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
	}
	return msg
}
type baseError struct {
	code string
	message string
	errs []error
}
func newBaseError(code, message string, origErrs []error) *baseError {
	b := &baseError{
		code:    code,
		message: message,
		errs:    origErrs,
	}
	return b
}
func (b baseError) Error() string {
	size := len(b.errs)
	if size > 0 {
		return SprintError(b.code, b.message, "", errorList(b.errs))
	}
	return SprintError(b.code, b.message, "", nil)
}
func (b baseError) String() string {
	return b.Error()
}
func (b baseError) Code() string {
	return b.code
}
func (b baseError) Message() string {
	return b.message
}
func (b baseError) OrigErr() error {
	switch len(b.errs) {
	case 0:
		return nil
	case 1:
		return b.errs[0]
	default:
		if err, ok := b.errs[0].(Error); ok {
			return NewBatchError(err.Code(), err.Message(), b.errs[1:])
		}
		return NewBatchError("BatchedErrors",
			"multiple errors occured", b.errs)
	}
}
func (b baseError) OrigErrs() []error {
	return b.errs
}
type awsError Error
type requestError struct {
	awsError
	statusCode int
	requestID  string
}