func (u *UnmarshalErrorHandler) UnmarshalError(r *request.Request) {
	defer r.HTTPResponse.Body.Close()

	respMeta := ResponseMetadata{
		StatusCode: r.HTTPResponse.StatusCode,
		RequestID:  r.RequestID,
	}

	v, err := u.unmarshaler.UnmarshalError(r.HTTPResponse, respMeta)
	if err != nil {
		r.Error = awserr.NewRequestFailure(
			awserr.New(request.ErrCodeSerialization,
				"failed to unmarshal response error", err),
			respMeta.StatusCode,
			respMeta.RequestID,
		)
		return
	}

	r.Error = v
}
// UnmarshalError will attempt to unmarshal the API response's error message
// into either a generic SDK error type, or a typed error corresponding to the
// errors exception name.
UnmarshalError will attempt to unmarshal the API response's error message
into either a generic SDK error type, or a typed error corresponding to the
errors exception name.
// UnmarshalError will attempt to unmarshal the API response ' s error message // into either a generic SDK error type or a typed error corresponding to the // errors exception name .
func (u *UnmarshalErrorHandler) UnmarshalError(r *request.Request) {
	defer r.HTTPResponse.Body.Close()
	respMeta := ResponseMetadata{
		StatusCode: r.HTTPResponse.StatusCode,
		RequestID:  r.RequestID,
	}
	v, err := u.unmarshaler.UnmarshalError(r.HTTPResponse, respMeta)
	if err != nil {
		r.Error = awserr.NewRequestFailure(
			awserr.New(request.ErrCodeSerialization,
				"failed to unmarshal response error", err),
			respMeta.StatusCode,
			respMeta.RequestID,
		)
		return
	}
	r.Error = v
}
func ( u * UnmarshalErrorHandler ) UnmarshalError ( r * request . Request ) { defer r . HTTPResponse . Body . Close ( ) respMeta := ResponseMetadata { StatusCode : r . HTTPResponse . StatusCode , RequestID : r . RequestID , } v , err := u . unmarshaler . UnmarshalError ( r . HTTPResponse , respMeta ) if err != nil { r . Error = awserr . NewRequestFailure ( awserr . New ( request . ErrCodeSerialization , " " , err ) , respMeta . StatusCode , respMeta . RequestID , ) return } r . Error = v }
UnmarshalError will attempt to unmarshal the API response's error message
into either a generic SDK error type, or a typed error corresponding to the
errors exception name.
UnmarshalError will attempt to unmarshal the API response ' s error message into either a generic SDK error type or a typed error corresponding to the errors exception name .