func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
	return ConfigurationError{
		message:           "endpoint resolver failed to find an endpoint for the provided ARN region",
		origErr:           err,
		resource:          resource,
		clientPartitionID: clientPartitionID,
		clientRegion:      clientRegion,
	}
}
NewFailedToResolveEndpointError denotes endpoint resolving error
package s3shared
import (
	"fmt"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/internal/s3shared/arn"
)
const (
	invalidARNErrorErrCode    = "InvalidARNError"
	configurationErrorErrCode = "ConfigurationError"
)
type InvalidARNError struct {
	message  string
	resource arn.Resource
	origErr  error
}
func (e InvalidARNError) Error() string {
	var extra string
	if e.resource != nil {
		extra = "ARN: " + e.resource.String()
	}
	return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
}
func (e InvalidARNError) Code() string {
	return invalidARNErrorErrCode
}
func (e InvalidARNError) Message() string {
	return e.message
}
func (e InvalidARNError) OrigErr() error {
	return e.origErr
}
func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError {
	return InvalidARNError{
		message:  "invalid ARN",
		origErr:  err,
		resource: resource,
	}
}
func NewInvalidARNWithCustomEndpointError(resource arn.Resource, err error) InvalidARNError {
	return InvalidARNError{
		message:  "resource ARN not supported with custom client endpoints",
		origErr:  err,
		resource: resource,
	}
}
func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError {
	return InvalidARNError{
		message:  "resource ARN not supported for the target ARN partition",
		origErr:  err,
		resource: resource,
	}
}
func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError {
	return InvalidARNError{
		message:  "resource ARN not supported for FIPS region",
		resource: resource,
		origErr:  err,
	}
}
type ConfigurationError struct {
	message           string
	resource          arn.Resource
	clientPartitionID string
	clientRegion      string
	origErr           error
}
func (e ConfigurationError) Error() string {
	extra := fmt.Sprintf("ARN: %s, client partition: %s, client region: %s",
		e.resource, e.clientPartitionID, e.clientRegion)
	return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
}
func (e ConfigurationError) Code() string {
	return configurationErrorErrCode
}
func (e ConfigurationError) Message() string {
	return e.message
}
func (e ConfigurationError) OrigErr() error {
	return e.origErr
}
func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
	return ConfigurationError{
		message:           "client partition does not match provided ARN partition",
		origErr:           err,
		resource:          resource,
		clientPartitionID: clientPartitionID,
		clientRegion:      clientRegion,
	}
}
func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
	return ConfigurationError{
		message:           "client region does not match provided ARN region",
		origErr:           err,
		resource:          resource,
		clientPartitionID: clientPartitionID,
		clientRegion:      clientRegion,
	}
}