aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go23
1 files changed, 21 insertions, 2 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
index 56fdfc2..99849c0 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
@@ -138,8 +138,27 @@ type RequestFailure interface {
138 RequestID() string 138 RequestID() string
139} 139}
140 140
141// NewRequestFailure returns a new request error wrapper for the given Error 141// NewRequestFailure returns a wrapped error with additional information for
142// provided. 142// request status code, and service requestID.
143//
144// Should be used to wrap all request which involve service requests. Even if
145// the request failed without a service response, but had an HTTP status code
146// that may be meaningful.
143func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure { 147func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure {
144 return newRequestError(err, statusCode, reqID) 148 return newRequestError(err, statusCode, reqID)
145} 149}
150
151// UnmarshalError provides the interface for the SDK failing to unmarshal data.
152type UnmarshalError interface {
153 awsError
154 Bytes() []byte
155}
156
157// NewUnmarshalError returns an initialized UnmarshalError error wrapper adding
158// the bytes that fail to unmarshal to the error.
159func NewUnmarshalError(err error, msg string, bytes []byte) UnmarshalError {
160 return &unmarshalError{
161 awsError: New("UnmarshalError", msg, err),
162 bytes: bytes,
163 }
164}