request.go

 1package aws
 2
 3import (
 4	"fmt"
 5)
 6
 7// TODO remove replace with smithy.CanceledError
 8
 9// RequestCanceledError is the error that will be returned by an API request
10// that was canceled. Requests given a Context may return this error when
11// canceled.
12type RequestCanceledError struct {
13	Err error
14}
15
16// CanceledError returns true to satisfy interfaces checking for canceled errors.
17func (*RequestCanceledError) CanceledError() bool { return true }
18
19// Unwrap returns the underlying error, if there was one.
20func (e *RequestCanceledError) Unwrap() error {
21	return e.Err
22}
23func (e *RequestCanceledError) Error() string {
24	return fmt.Sprintf("request canceled, %v", e.Err)
25}