mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-19 03:20:20 +00:00
26 lines
667 B
Go
26 lines
667 B
Go
|
package aws
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
// TODO remove replace with smithy.CanceledError
|
||
|
|
||
|
// RequestCanceledError is the error that will be returned by an API request
|
||
|
// that was canceled. Requests given a Context may return this error when
|
||
|
// canceled.
|
||
|
type RequestCanceledError struct {
|
||
|
Err error
|
||
|
}
|
||
|
|
||
|
// CanceledError returns true to satisfy interfaces checking for canceled errors.
|
||
|
func (*RequestCanceledError) CanceledError() bool { return true }
|
||
|
|
||
|
// Unwrap returns the underlying error, if there was one.
|
||
|
func (e *RequestCanceledError) Unwrap() error {
|
||
|
return e.Err
|
||
|
}
|
||
|
func (e *RequestCanceledError) Error() string {
|
||
|
return fmt.Sprintf("request canceled, %v", e.Err)
|
||
|
}
|