mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
87c77727e4
* lib/backup/s3remote: update AWS SDK to v2 * Update lib/backup/s3remote/s3.go Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com> * lib/backup/s3remote: refactor error handling Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
25 lines
667 B
Go
25 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)
|
|
}
|