request.go (667B)
1 package aws 2 3 import ( 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. 12 type RequestCanceledError struct { 13 Err error 14 } 15 16 // CanceledError returns true to satisfy interfaces checking for canceled errors. 17 func (*RequestCanceledError) CanceledError() bool { return true } 18 19 // Unwrap returns the underlying error, if there was one. 20 func (e *RequestCanceledError) Unwrap() error { 21 return e.Err 22 } 23 func (e *RequestCanceledError) Error() string { 24 return fmt.Sprintf("request canceled, %v", e.Err) 25 }