request.go 667 B

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